[New-bugs-announce] [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple

Isaac Morland report at bugs.python.org
Sun Jul 30 21:19:07 EDT 2017


New submission from Isaac Morland:

This is meant to replace my proposal in #30020 to change attrgetter to use namedtuple.  By creating a new function implemented in Python, I avoid making changes to the existing attrgetter, which means that both the need of implementing a C version and the risk of changing the performance or other characteristics of the existing function are eliminated.

My suggestion is to put this in the collections module next to namedtuple.  This eliminates the circular import problem and is a natural fit as it is an application of namedtuple.

----------
components: Library (Lib)
messages: 299534
nosy: Isaac Morland
priority: normal
severity: normal
status: open
title: Add namedattrgetter function which acts like attrgetter but uses namedtuple
type: enhancement
versions: Python 3.7

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


More information about the New-bugs-announce mailing list