Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundle2.py @ 31483:413b44003462
py3: add __bool__ to every class defining __nonzero__
__nonzero__ was renamed to __bool__ in Python 3. This patch simply
aliases __bool__ to __nonzero__ for every class implementing
__nonzero__.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 13 Mar 2017 12:40:14 -0700 |
parents | f01df5d2fe49 |
children | 4dbef666c6c9 |
line wrap: on
line diff
--- a/mercurial/bundle2.py Mon Mar 13 21:58:43 2017 -0700 +++ b/mercurial/bundle2.py Mon Mar 13 12:40:14 2017 -0700 @@ -271,6 +271,8 @@ def __nonzero__(self): return bool(self._sequences) + __bool__ = __nonzero__ + class bundleoperation(object): """an object that represents a single bundling process