Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Element truthiness on Python 3 #68

Merged
merged 1 commit into from
Jul 1, 2022
Merged

Conversation

davidjb
Copy link
Contributor

@davidjb davidjb commented Dec 19, 2019

Python 3 changed __nonzero__ to __bool__
(https://portingguide.readthedocs.io/en/latest/core-obj-misc.html#customizing-truthiness-bool)
-- this makes the standard class implementation Python 3 and provides an alias for Python 2 compatibility.

Previous to this change, all Element instances were considered false on Python 3.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.6%) to 35.494% when pulling 8e23f0d on davidjb:truthiness into cd441fd on stchris:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.6%) to 35.494% when pulling 8e23f0d on davidjb:truthiness into cd441fd on stchris:master.

@stchris stchris added this to the 1.2.0 milestone Jul 1, 2022
Python 3 changed `__nonzero__` for `__bool__`
(https://portingguide.readthedocs.io/en/latest/core-obj-misc.html#customizing-truthiness-bool)
-- this makes the standard class implementation Python 3 and
provides an alias for Python 2 compatibility.
@stchris stchris merged commit f0370dc into stchris:main Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants