Exploring Attributes and Methods
ptmcg at austin.rr.com
Thu Mar 6 20:35:06 CET 2008
On Mar 6, 1:14 pm, "keios.ti... at gmail.com" <keios.ti... at gmail.com>
> Is there a python command that allows me to extract the names (not
> values) of the attributes of a class.
> Class Sample:
> fullname = 'Something'
> How can I know that this class has an attribute called 'fullname'?
> I hope my question is clear.
If you had posted actual working code, "Class" would be all lower case
("class"). But we get the drift (in general, though, when posting
questions about examples from your code, best to copy-paste the actual
code, not a paraphrasing of it):
['__module__', 'fullname', '__doc__']
More information about the Python-list