Dear Tutors, I have an object to which I dynamically add attributes. My question is how I can inspect and display them at run-time?
Class a(): pass Obj1 = a() Obj1.name = "Bob" Obj1.age = 45 dir(a) returns a tuple which contains name and age, but also other things (includings methods, etc.) I could filter this tuple (checking for callable(), etc.) but I just wondered if there was an existing way of getting just name and age. Thanks, Matt Sent from my BlackBerry® wireless device _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor