Skip to content

Commit

Permalink
py312: fix AttributeError doctests (manual changes)
Browse files Browse the repository at this point in the history
In python 3.12, attribute errors add a suggestion at the end of the
usual error message ("Did you mean ...?").

We add ... at the end of these doctest outputs to fix it.

This commit has a few manual changes which didn't match the sed pattern
in the previous commit.
  • Loading branch information
tornaria committed Oct 4, 2023
1 parent bf4b9e5 commit f1b77b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sage/structure/element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ cdef class RingElement(ModuleElement):
sage: m.is_nilpotent() # needs sage.modules
Traceback (most recent call last):
...
AttributeError: ... object has no attribute 'is_nilpotent'...
AttributeError: '...' object has no attribute 'is_nilpotent'...
"""
if self.is_unit():
return False
Expand Down
2 changes: 1 addition & 1 deletion src/sage/symbolic/assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def assume(*args):
Traceback (most recent call last):
...
AttributeError: 'sage.rings.integer.Integer' object has no
attribute 'assume'
attribute 'assume'...
Ensure that we can combine the two types of assumptions, as documented::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/symbolic/expression.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13712,7 +13712,7 @@ cdef get_dynamic_class_for_function(unsigned serial):
Traceback (most recent call last):
...
AttributeError: 'sage.symbolic.expression.Expression' object has no
attribute 'argp1'
attribute 'argp1'...
sage: t = (e + 1).op[0]; t
tfunc(x)
sage: t
Expand Down

0 comments on commit f1b77b1

Please sign in to comment.