Skip to content

Commit

Permalink
Remove __nonzero__ methods (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 21, 2022
1 parent 6d29bff commit 33d1dd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions babel/messages/pofile.py
Expand Up @@ -92,11 +92,9 @@ def append(self, s):
def denormalize(self):
return ''.join(map(unescape, self._strs))

def __nonzero__(self):
def __bool__(self):
return bool(self._strs)

__bool__ = __nonzero__

def __repr__(self):
return os.linesep.join(self._strs)

Expand Down
2 changes: 1 addition & 1 deletion babel/support.py
Expand Up @@ -192,7 +192,7 @@ def value(self):
def __contains__(self, key):
return key in self.value

def __nonzero__(self):
def __bool__(self):
return bool(self.value)

def __dir__(self):
Expand Down

0 comments on commit 33d1dd7

Please sign in to comment.