py3: implement __bool__ in addition to __nonzero__
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 11 Jul 2019 16:49:01 -0700
changeset 4739 ce6e69b2f759
parent 4738 45508676ed00
child 4740 f8ef6d5f56f2
py3: implement __bool__ in addition to __nonzero__
hgext3rd/evolve/state.py
--- 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