@@ -599,8 +599,8 @@ def byte_BUILD_TUPLE_UNPACK_WITH_CALL(self, count):
599
599
# This is similar to BUILD_TUPLE_UNPACK, but is used for f(*x, *y, *z)
600
600
# call syntax. The stack item at position count + 1 should be the
601
601
# corresponding callable f.
602
- elts = self .popn (count )
603
- self . push ( tuple ( e for l in elts for e in l ))
602
+ self .byte_BUILD_TUPLE_UNPACK (count )
603
+
604
604
605
605
def byte_BUILD_TUPLE_UNPACK (self , count ):
606
606
# Pops count iterables from the stack, joins them in a single tuple,
@@ -613,6 +613,10 @@ def byte_BUILD_TUPLE(self, count):
613
613
elts = self .popn (count )
614
614
self .push (tuple (elts ))
615
615
616
+ def byte_BUILD_LIST_UNPACK (self , count ):
617
+ elts = self .popn (count )
618
+ self .push ([e for l in elts for e in l ])
619
+
616
620
def byte_BUILD_LIST (self , count ):
617
621
elts = self .popn (count )
618
622
self .push (elts )
@@ -633,14 +637,14 @@ def byte_BUILD_CONST_KEY_MAP(self, count):
633
637
634
638
def byte_BUILD_MAP (self , count ):
635
639
# Pushes a new dictionary on to stack.
636
- if not ( six . PY3 and sys .version_info . minor >= 5 ):
640
+ if sys .version_info [: 2 ] < ( 3 , 5 ):
637
641
self .push ({})
638
642
return
639
643
# Pop 2*count items so that
640
644
# dictionary holds count entries: {..., TOS3: TOS2, TOS1:TOS}
641
645
# updated in version 3.5
642
646
kvs = {}
643
- for i in range (0 , count ):
647
+ for i in range (count ):
644
648
key , val = self .popn (2 )
645
649
kvs [key ] = val
646
650
self .push (kvs )
@@ -1063,7 +1067,7 @@ def byte_CALL_FUNCTION_VAR(self, arg):
1063
1067
def byte_CALL_FUNCTION_KW (self , argc ):
1064
1068
if not (six .PY3 and sys .version_info .minor >= 6 ):
1065
1069
kwargs = self .pop ()
1066
- return self .call_function (arg , [], kwargs )
1070
+ return self .call_function (argc , [], kwargs )
1067
1071
# changed in 3.6: keyword arguments are packed in a tuple instead
1068
1072
# of a dict. argc indicates total number of args.
1069
1073
kwargnames = self .pop ()
0 commit comments