Re: Get Class properties
Chris, Thanks a million! Regards, Emeka On Thu, Dec 29, 2011 at 1:27 AM, Chris Angelico ros...@gmail.com wrote: On Wed, Dec 28, 2011 at 11:13 PM, Emeka emekami...@gmail.com wrote: Hello All, I have seen what I am looking for.. __dict__. Yep! You may also want to look at the dir() function. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list -- *Satajanus Nig. Ltd * -- http://mail.python.org/mailman/listinfo/python-list
Re: Get Class properties
Hello All, I have seen what I am looking for.. __dict__. Thanks! Regards, Janus On Wed, Dec 28, 2011 at 1:05 PM, Emeka emekami...@gmail.com wrote: Hello All, Say I have a class like below class Town: state = StateClass() cities = CityClass() Is there way to introspect such that one can list the properties keys and their values in such a way that it would look like playing around dictionary ? Regards, Janus -- *Satajanus Nig. Ltd * -- *Satajanus Nig. Ltd * -- http://mail.python.org/mailman/listinfo/python-list
Get Class properties
Hello All, Say I have a class like below class Town: state = StateClass() cities = CityClass() Is there way to introspect such that one can list the properties keys and their values in such a way that it would look like playing around dictionary ? Regards, Janus -- *Satajanus Nig. Ltd * -- http://mail.python.org/mailman/listinfo/python-list
Re: Get Class properties
On Wed, Dec 28, 2011 at 11:13 PM, Emeka emekami...@gmail.com wrote: Hello All, I have seen what I am looking for.. __dict__. Yep! You may also want to look at the dir() function. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list