- Notifications
You must be signed in to change notification settings - Fork3.8k
Removed Python 2 nonzero#3194
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice cleanup, thanks for the PR! 👍 🎉
PS: quick search shows that there are a few more uses of__nonzero__ in the pygame codebase, notably sprite still uses it. You could clean that up too if you wish 😉
I'm waiting to approve this until after you either fix up the other nonzeros or say you wont fix up the other nonzeros in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you kindly.
Uh oh!
There was an error while loading.Please reload this page.
Following the discussion on Discord,@Starbuck5 had pointed out that
__nonzero__was being used to support both Python 2 and 3. Removed support for Python 2 by only implementing__bool__.