New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
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. ---------- components: Library (Lib) messages: 404420 nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka priority: normal severity: normal status: open title: Enum's dir() does not contain inherited members type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45535> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com