[Tutor] Help: get/set attributes via string names

pm5 at matilda.fiorile.org pm5 at matilda.fiorile.org
Wed Jan 21 05:32:15 EST 2004

Hi everyone:

Sorry if the is a FAQ but I've searched and googled and still don't get it.

As far as I can tell, there are various way to [1]customize an attribute
for an object.  Consequetly an attribute may be well-defined even if the
name is not in ob.__dict__.  So given a string name, how do I access the
attribute correctly, if I don't know the way it is defined?

 1. http://python.org/doc/2.3.3/ref/attribute-access.html

More information about the Tutor mailing list