David S. wrote: > Does something like operator.getattr exist to perform a chained attr > lookup? > > I came up with the following, but I can not help but think it is > already done and done better.
You were on the right track, but the built-in getattr is a perfectly good argument to reduce(), using operator.attrgetter just makes the definition more complicated (see my other post). -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mailman/listinfo/python-list