add __bool__ alias to __nonzero__ methods

Signed-off-by: Adrian Tschira <nota@notafile.com>
This commit is contained in:
Adrian Tschira 2018-04-15 16:39:30 +02:00
parent 154b44c249
commit f63ff73c7f
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()