mirror of
https://github.com/python/cpython.git
synced 2025-09-29 03:35:31 +00:00
Merge
This commit is contained in:
commit
6932b5b3a3
1 changed files with 1 additions and 1 deletions
|
@ -754,7 +754,7 @@ Enum's boolean evaluation depend on the member's value add the following to
|
||||||
your class::
|
your class::
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return bool(self._value_)
|
return bool(self.value)
|
||||||
|
|
||||||
The :attr:`__members__` attribute is only available on the class.
|
The :attr:`__members__` attribute is only available on the class.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue