New submission from Isaac Morland:

I would find it useful if the tuples returned by attrgetter functions were 
namedtuples.  An initial look at the code for attrgetter suggests that this 
would be an easy change and should make little difference to performance.  
Giving a namedtuple where previously a tuple was returned seems unlikely to 
trigger bugs in existing code so I propose to simply change attrgetter rather 
than providing a parameter to specify whether or not to use the new behaviour.

Patch will be forthcoming but comments appreciated.

----------
components: Library (Lib)
messages: 291314
nosy: Isaac Morland
priority: normal
severity: normal
status: open
title: Make attrgetter use namedtuple
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to