[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

Nick Coghlan report at bugs.python.org
Tue Sep 3 06:59:56 EDT 2019


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Reviewing this again now, I think my previous naming suggestion is problematic, as it encourages conflating two different concepts that use similar syntax:

* collecting arbitrary positional parameters in a tuple (VAR_POSITIONAL) or arbitrary keyword parameters in a dictionary (VAR_POSITIONAL, VAR_KEYWORD)
* unpacking function arguments from iterables (BUILD_VAR_POSITIONAL) or mappings (BUILD_VAR_KEYWORD)

I think the fix for that error is straightforward though: replace "VAR" with "ARG" in the new opcode names, giving:

* BUILD_ARG_POSITIONAL
* BUILD_ARG_KEYWORD

That should also read nicely with Zackery's documentation updates.

----------

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


More information about the Python-bugs-list mailing list