[issue19611] inspect.getcallargs doesn't properly interpret set comprehension code objects.

Nick Coghlan report at bugs.python.org
Thu Jun 2 18:48:00 EDT 2016


Nick Coghlan added the comment:

We definitely can't use a valid identifier in the code generator, since any valid identifier we used might shadow a nonlocal, global or builtin name (and the latter two cases aren't visible to the compiler at compile time).

They're also genuinely not positional only:

>>> print(setcomp_func(iter(range(5))))
{0, 1, 4, 9, 16}
>>> print(setcomp_func(**{".0": iter(range(5))}))
{0, 1, 4, 9, 16}

----------

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


More information about the Python-bugs-list mailing list