[issue1826] operator.attrgetter() should accept dotted attribute paths
Barry A. Warsaw
report at bugs.python.org
Tue Jan 15 00:05:37 CET 2008
Barry A. Warsaw added the comment:
I'm not /personally/ concerned with the breakage because practicality
beats purity, and I don't want to use lambda because it's slower. I've
never used operator.attrgetter() outside the specific use case of
sorted() and list.sort() so I'd like to make it able to be used in all
sorting-by-attribute-chasing use cases.
Other options: have sorted() and list.sort() grow another keyword
argument for the attribute-path; add another method called attrchaser()
in some module that adds the requested functionality.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1826>
__________________________________
More information about the Python-bugs-list
mailing list