changeset 4739:ce6e69b2f759

py3: implement __bool__ in addition to __nonzero__
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 11 Jul 2019 16:49:01 -0700
parents 45508676ed00
children f8ef6d5f56f2
files hgext3rd/evolve/state.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/state.py	Thu Jul 11 14:21:23 2019 -0700
+++ b/hgext3rd/evolve/state.py	Thu Jul 11 16:49:01 2019 -0700
@@ -45,6 +45,8 @@
     def __nonzero__(self):
         return self.exists()
 
+    __bool__ = __nonzero__
+
     def __contains__(self, key):
         return key in self.opts