[Python-Dev] dir() and __all__
skip at pobox.com
skip at pobox.com
Sat Feb 16 03:15:54 CET 2008
More information about the Python-Dev mailing list
Sat Feb 16 03:15:54 CET 2008
- Previous message: [Python-Dev] dir() and __all__
- Next message: [Python-Dev] dir() and __all__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido> It's not consistent with what dir() of a class or instance does
Guido> though. -1.
Agreed. The only official use I'm aware of is to restrict what is imported
when you execute
from mod import *
Raymond> >>> Queue.__all__
Raymond> ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
>> I like the second one better.
How would you easily ask an object for all its attributes?
Skip
- Previous message: [Python-Dev] dir() and __all__
- Next message: [Python-Dev] dir() and __all__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list