Inheritance and name clashes

Steven D'Aprano steve-REMOVE-THIS at cybersource.com.au
Sun Oct 3 22:11:56 EDT 2010


On Mon, 04 Oct 2010 11:57:18 +1300, Gregory Ewing wrote:

> Rock wrote:
>> What if the
>> library I'm using doesn't realase the source, or what if I just can't
>> get my hands on it for some reason or another?
> 
> You can always use dir() on an instance of the class to find out what
> names it's using.

*Some* names that it is using.

dir() is meant to be "interesting" rather than complete, so it may not 
display all attribute names, and it won't list dynamic attributes 
controlled by __getattr__ and friends. See the Fine Manual:

http://docs.python.org/library/functions.html#dir



-- 
Steven



More information about the Python-list mailing list