mirror of
https://github.com/python/cpython.git
synced 2025-10-05 22:51:56 +00:00
revert change 87a9dff5106c: pure Enum members again evaluate to True;
update Finer Points section of docs to cover boolean evaluation; add more tests for pure and mixed boolean evaluation
This commit is contained in:
parent
43cfd8240c
commit
60255b67b9
3 changed files with 26 additions and 5 deletions
|
@ -482,9 +482,6 @@ class Enum(metaclass=EnumMeta):
|
|||
def __str__(self):
|
||||
return "%s.%s" % (self.__class__.__name__, self._name_)
|
||||
|
||||
def __bool__(self):
|
||||
return bool(self._value_)
|
||||
|
||||
def __dir__(self):
|
||||
added_behavior = [
|
||||
m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue