[issue31753] Unnecessary closure in ast.literal_eval

Serhiy Storchaka report at bugs.python.org
Thu Oct 12 04:52:29 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I prefer the existing code too.

But I'm surprised that this change has a measurable effects at all. I thought that creating a closure is cheaper. Of course it is much faster than creating a class. Maybe it is worth to spend some time for optimizing closure creation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31753>
_______________________________________


More information about the Python-bugs-list mailing list