Traversing the properties of a Class
horpner at yahoo.com
Thu Jan 18 19:03:41 CET 2007
On 2007-01-18, EdG <edquichan at yahoo.com> wrote:
> For debugging purposes, I would like to traverse the class
> listing out all the properties.
This is the first thing that came to mind.
for attr in dir(cls):
if isinstance(getattr(cls, attr), property):
Posted via a free Usenet account from http://www.teranews.com
More information about the Python-list