Skip to content

Commit b798d69

Browse files
committed
strip text after #-sign
1 parent ed94024 commit b798d69

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/sage/databases/oeis.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,15 +891,20 @@ def old_IDs(self):
891891
A000045: Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
892892
893893
sage: f.old_IDs() # optional -- internet
894-
('M0692', 'N0256'...)
894+
('M0692', 'N0256')
895895
896896
TESTS::
897897
898898
sage: s = oeis._imaginary_sequence()
899899
sage: s.old_IDs()
900900
('M9999', 'N9999')
901901
"""
902-
return tuple(self._field('I')[0].split(' '))
902+
s = self._field('I')[0]
903+
# We remove all parts after '#'
904+
s = s.split('#')[0].strip()
905+
if not s:
906+
return ()
907+
return tuple(s.split(' '))
903908

904909
def offsets(self):
905910
r"""
@@ -1804,7 +1809,6 @@ def show(self):
18041809
URL
18051810
https://oeis.org/A012345
18061811
<BLANKLINE>
1807-
...
18081812
AUTHOR
18091813
Patrick Demichel (patrick.demichel(AT)hp.com)
18101814
<BLANKLINE>

0 commit comments

Comments
 (0)