New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:

Attribute access for named tuples can be made as fast as attribute access of 
instances of classes with slots.  All that is needed is a C subclass of 
property with it own __get__ that directly look's up the tuple field using 
PyTuple_GET_ITEM using an index stored in a C struct rather than as an integer 
object.

----------
components: Extension Modules
messages: 309477
nosy: rhettinger
priority: normal
severity: normal
status: open
title: C Fast path for namedtuple's property/itemgetter pair
versions: Python 3.7

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

Reply via email to