[Chicago] Getting list of members of function in class
maney at two14.net
Wed Mar 7 20:41:22 CET 2007
On Wed, Mar 07, 2007 at 01:19:47PM -0600, Lukasz Szybalski wrote:
> I am trying to get a list of members of a function, namely:
> class A:
> def dowork(self):
> How can i get a list of items that were created in dowork, namely:
As written (is this a typo?) those four are local variables of the
function, and are freed when dowork exits. If they're supposed to be
self.name, etc., then they will be added to the object, and you could
do something like
a = A()
Or just >>> a.__dict__ in the interpreter to examine the object.
Hebb's dictum: If it isn't worth doing, it isn't worth doing well.
More information about the Chicago