thanks. I'll use the getattr function now, and I think I understand
where I went wrong with eval. I was thinking in Lisp where the lexical
scope would mean that obj is defined
--
http://mail.python.org/mailman/listinfo/python-list
hi everybody
I've written this function to make a list of all of an objects
attributes and methods (not for any reason, I'm just learning)
def list_members(obj)
l = dir(obj)
return map(lambda x : eval('obj.'+x), l)
but I get an error saying that obj isn't defined. As I understand it
eval