Ethan Furman added the comment: With custom __dir__:
Help on class Enum in module enum: Enum = <enum 'Enum'> ---------------------------------------------------- Without custom __dir__: Help on class Enum in module enum: class Enum(builtins.object) | Generic enumeration. | | Derive from this class to define new enumerations. | | Methods defined here: | | __eq__(self, other) | | __getnewargs__(self) | | __hash__(self) | | __repr__(self) | | __str__(self) | | ---------------------------------------------------------------------- | Static methods defined here: | | __new__(cls, value) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | name | Route attribute access on a class to __getattr__. | | This is a descriptor, used to define attributes that act differently when | accessed through an instance and through a class. Instance access remains | normal, but access to an attribute through a class will be routed to the | class's __getattr__ method; this is done by raising AttributeError. | | value | Route attribute access on a class to __getattr__. | | This is a descriptor, used to define attributes that act differently when | accessed through an instance and through a class. Instance access remains | normal, but access to an attribute through a class will be routed to the | class's __getattr__ method; this is done by raising AttributeError. --------------------------------------------------------------- I'm thinking we should drop the custom __dir__. help() is far more important than not seeing some things with dir(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18693> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com