Skip to content

Commit

Permalink
implemented __bool__ in addition to __nonzero__ to be py3k compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
electronic-shop-bartel committed Aug 13, 2015
1 parent abe37ab commit e6c91fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions YamlObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class YamlNone(object):
def __nonzero__(self):
return False

def __bool__(self):
return False

def __getattribute__(self, item):
return YamlNone()

Expand Down

0 comments on commit e6c91fa

Please sign in to comment.