Message404420
For example:
>>> from enum import *
>>> class E(IntEnum):
... x = 1
...
>>> dir(E)
['__class__', '__doc__', '__members__', '__module__', 'x']
>>> E.from_bytes
<built-in method from_bytes of EnumType object at 0x559d47415ce0>
>>> E.to_bytes
<method 'to_bytes' of 'int' objects>
>>> E.numerator
<attribute 'numerator' of 'int' objects>
>>> E.__add__
<slot wrapper '__add__' of 'int' objects>
There are methods and attributes inherited from int, but they are not shown in dir(). As result they are absent in help() and completion does not work for them. |
|
Date |
User |
Action |
Args |
2021-10-20 10:35:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, eli.bendersky, ethan.furman |
2021-10-20 10:35:06 | serhiy.storchaka | set | messageid: <1634726106.14.0.525814954361.issue45535@roundup.psfhosted.org> |
2021-10-20 10:35:06 | serhiy.storchaka | link | issue45535 messages |
2021-10-20 10:35:05 | serhiy.storchaka | create | |
|