[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

Serhiy Storchaka report at bugs.python.org
Tue Nov 8 07:55:03 EST 2016


Serhiy Storchaka added the comment:

One of problems with this patch is that it make instantiating a namedtuple much slower (due to parsing arguments by Python code). This can be solved by using eval() for creating only the __new__ method (see commented out line "result.__new__ = eval(...)"). This increases the time of creating named tuple class, but it still is faster than with current code.

----------

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


More information about the Python-bugs-list mailing list