Skip to content

Commit

Permalink
Fix newint bool in py3
Browse files Browse the repository at this point in the history
  • Loading branch information
zihzihtw committed Apr 16, 2021
1 parent 4657ad2 commit fe645ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/future/types/newint.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ def __bool__(self):
"""
So subclasses can override this, Py3-style
"""
if PY3:
return super(newint, self).__bool__()

return super(newint, self).__nonzero__()

def __native__(self):
Expand Down

0 comments on commit fe645ba

Please sign in to comment.