Skip to content

Commit ba7e21f

Browse files
committed
Another fix: tuple is not ever equivalent, only literals
1 parent 8fa7202 commit ba7e21f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pep-0646.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,9 +884,8 @@ This accomplishes the desired outcome (making ``*args: *Ts`` not be a syntax
884884
error) while matching the behaviour of star-unpacking in other contexts:
885885
at runtime, ``__iter__`` is called on the starred object, and a tuple
886886
containing the items of the resulting iterator is set as the type annotion
887-
for ``args``. In other words, at runtime ``*args: *foo`` is equivalent to
888-
``*args: tuple(*foo)`` and its abstract syntax tree is indistinguishable
889-
from ``*args: (*foo,)``.
887+
for ``args``. In other words, in both the Ast compiler output and the
888+
runtime, ``*args: *foo`` is indistinguishable from ``*args: (*foo,)``.
890889

891890
::
892891

0 commit comments

Comments
 (0)