[issue30020] Make attrgetter use namedtuple

R. David Murray report at bugs.python.org
Sat Apr 8 16:13:07 EDT 2017


R. David Murray added the comment:

This is a clever idea, but I vote -1 for this proposal.  I think it makes attrgetter more complex for little purpose.  The fact that only some attribute names work and the others get mangled makes the API very ugly and not, IMO, desirable.

Finally, if you want this, you can pretty easily write a function that wraps attrgetter to do it.  I don't think it has enough utility to justify being in the stdlib.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30020>
_______________________________________


More information about the Python-bugs-list mailing list