-
-
Notifications
You must be signed in to change notification settings - Fork 674
Closed
Milestone
Description
Steps To Reproduce
In a fresh session,
sage: s = oeis(17)
sage: s.is_dead()
/home/martin/sage/src/sage/databases/oeis.py:1153: RuntimeWarning: This sequence is dead: "A000017: Erroneous version of A032522."
warn('This sequence is dead: "{}: {}"'.format(self.id(), self.name()), RuntimeWarning)
True
Expected Behavior
It should just return the result, without triggering the warning.
Actual Behavior
A warning is triggered, which is annoying when processing many sequences.
Additional Information
The reason is that OEISSequence._field
issues a warning when the sequence is dead, and this cannot be bypassed.
I see two possible solutions:
- have a keyword
warn
for_field(self, warn=True)
and, inis_dead
, do"dead" in self._field('K', warn=False)[0]
. - check the
raw_entry
inis_dead
directly, e.g.,["dead" in l[11:] for l in s.raw_entry().splitlines() if l[1] == "K"]
Environment
irrelevant.
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide