is it possible to make first attr variable?some_object.attr.attr so instead of attr I could use self.foo which has value "attr"
I think you're looking for getattr: http://docs.python.org/library/functions.html#getattr name = "spam"getattr(some_object, name) == some_object.spam == getattr(some_object, "spam")
-- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list