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

Add __bool__ for python 3 #1032

Closed
wants to merge 1 commit into from
Closed

Add __bool__ for python 3 #1032

wants to merge 1 commit into from

Conversation

pib
Copy link

@pib pib commented Jun 10, 2013

Python 3 checks bool instead of nonzero when testing the "truthiness" of an object. This was causing some code to use len instead of nonzero, and it was returning 0, which was causing an instance of DummyResource to be "falsy" instead.

@mcdonc
Copy link
Member

mcdonc commented Jun 11, 2013

Thank you! I didn't use exacly your patch but it's fixed all the same.

mcdonc added a commit that referenced this pull request Jul 16, 2013
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.

2 participants