Message194717
| Author |
ethan.furman |
| Recipients |
barry, eli.bendersky, ethan.furman |
| Date |
2013年08月09日.05:20:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1376025621.48.0.817315675345.issue18693@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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(). |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年08月09日 05:20:21 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky |
| 2013年08月09日 05:20:21 | ethan.furman | set | messageid: <1376025621.48.0.817315675345.issue18693@psf.upfronthosting.co.za> |
| 2013年08月09日 05:20:21 | ethan.furman | link | issue18693 messages |
| 2013年08月09日 05:20:20 | ethan.furman | create |
|