Merge pull request #3107 from NotAFile/py3-bool-nonzero

add __bool__ alias to __nonzero__ methods
This commit is contained in:
Richard van der Hoff 2018-04-20 15:43:39 +01:00 committed by GitHub
commit 8dc4a6144b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -92,6 +92,7 @@ class LoggingContext(object):
def __nonzero__(self):
return False
__bool__ = __nonzero__ # python3
sentinel = Sentinel()