chained attrgetter
Brian Beck
exogen at gmail.com
Thu Oct 26 05:02:35 EDT 2006
More information about the Python-list mailing list
Thu Oct 26 05:02:35 EDT 2006
- Previous message (by thread): chained attrgetter
- Next message (by thread): chained attrgetter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): chained attrgetter
- Next message (by thread): chained attrgetter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list