embarrassing class question
Paul Rudin
paul.nospam at rudin.co.uk
Fri Oct 29 04:27:21 EDT 2010
Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:
> Brendan wrote:
>> I use
>> Python sporadically, and frequently use the dir command to learn or
>> remind myself of class methods.
>
> You can clean up dir() by defining __all__ as a list of
> names that you want to officially export. Other names will
> still be there, but they won't show up in the dir() listing.
I'm not sure that's necessarily a good idea... when you're trying to figure
out why something behaves in a certain way you want to check for the
presence of methods with special names.
More information about the Python-list
mailing list