mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
use public 'value'
This commit is contained in:
parent
51578c0c98
commit
2ae4ea54a2
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::
|
||||
|
||||
def __bool__(self):
|
||||
return bool(self._value_)
|
||||
return bool(self.value)
|
||||
|
||||
The :attr:`__members__` attribute is only available on the class.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue