summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 8d23933..1e028a3 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -714,6 +714,9 @@ class Flag(Enum):
'|'.join([str(m._name_ or m._value_) for m in members]),
)
+ def __bool__(self):
+ return bool(self._value_)
+
def __or__(self, other):
if not isinstance(other, self.__class__):
return NotImplemented