# HG changeset patch # User Martin von Zweigbergk # Date 1562888941 25200 # Node ID ce6e69b2f7596bd22e50ba7a48b7530aa097030c # Parent 45508676ed00b3f24da7bd3ab459ae7a57d32337 py3: implement __bool__ in addition to __nonzero__ diff -r 45508676ed00 -r ce6e69b2f759 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