import amara def chain_attribute_call(obj, attlist): \"\"\" Allows to execute chain attribute calls \"\"\" splitted_attrs = attlist.split(\".\")
you could also use:
from operator import attrgetter attrgetter('x.y.z')(doc)