You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Python 2 alias __bool__ back to __nonzero__ and delete __bool__.
This allows SageObject._test_not_implemented_methods to pass on Python 2 and 3 for classes that implement this abstract interface.
This could just as easily be done the other way around and I'm not overly particular about it--I just prefer __bool__ for its clearer name.
Yes, in this specific case. Again it has to do with the SageObject._test_not_implemented_methods. It loops over an object's dir() and in this case may find a __nonzero__ that's not implemented.
Replace
__nonzero__
with__bool__
for Python 3.On Python 2 alias
__bool__
back to__nonzero__
and delete__bool__
.This allows
SageObject._test_not_implemented_methods
to pass on Python 2 and 3 for classes that implement this abstract interface.This could just as easily be done the other way around and I'm not overly particular about it--I just prefer
__bool__
for its clearer name.Component: python3
Author: Erik Bray
Branch/Commit:
c84bbe1
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/24294
The text was updated successfully, but these errors were encountered: