[issue29360] Don't check if all keys are strings in _PyStack_AsDict()

Serhiy Storchaka report at bugs.python.org
Tue Jan 24 04:06:31 EST 2017


Serhiy Storchaka added the comment:

The assertion was valid while all keywords did came from a constant keywords tuple in CALL_FUNCTION_KW. But if the FASTCALL protocol is extended for var-keyword arguments, keywords can be arbitrary and the assertion can fail. The assertion on the next line can fail too.

Calling _PyStack_AsDict() with non-string or non-unique keywords means that the var-keyword argument was first unpacked to arrays of keyword names and values and then converted back to a dict. Seems something is done non-efficiently.

----------

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


More information about the Python-bugs-list mailing list