[Tutor] Listing all of an instances variables

Python python at venix.com
Sat Oct 8 19:59:54 CEST 2005


   def report(self):
	for i in dir(self):
	    # use the getattr function
	    print getattr(self, i)

-- 
Lloyd Kvam
Venix Corp



More information about the Tutor mailing list