@@ -598,8 +598,8 @@ def byte_BUILD_TUPLE_UNPACK_WITH_CALL(self, count):
598
598
# This is similar to BUILD_TUPLE_UNPACK, but is used for f(*x, *y, *z)
599
599
# call syntax. The stack item at position count + 1 should be the
600
600
# corresponding callable f.
601
- elts = self .popn (count )
602
- self . push ( tuple ( e for l in elts for e in l ))
601
+ self .byte_BUILD_TUPLE_UNPACK (count )
602
+
603
603
604
604
def byte_BUILD_TUPLE_UNPACK (self , count ):
605
605
# Pops count iterables from the stack, joins them in a single tuple,
@@ -612,6 +612,10 @@ def byte_BUILD_TUPLE(self, count):
612
612
elts = self .popn (count )
613
613
self .push (tuple (elts ))
614
614
615
+ def byte_BUILD_LIST_UNPACK (self , count ):
616
+ elts = self .popn (count )
617
+ self .push ([e for l in elts for e in l ])
618
+
615
619
def byte_BUILD_LIST (self , count ):
616
620
elts = self .popn (count )
617
621
self .push (elts )
@@ -632,14 +636,14 @@ def byte_BUILD_CONST_KEY_MAP(self, count):
632
636
633
637
def byte_BUILD_MAP (self , count ):
634
638
# Pushes a new dictionary on to stack.
635
- if not ( six . PY3 and sys .version_info . minor >= 5 ):
639
+ if sys .version_info [: 2 ] < ( 3 , 5 ):
636
640
self .push ({})
637
641
return
638
642
# Pop 2*count items so that
639
643
# dictionary holds count entries: {..., TOS3: TOS2, TOS1:TOS}
640
644
# updated in version 3.5
641
645
kvs = {}
642
- for i in range (0 , count ):
646
+ for i in range (count ):
643
647
key , val = self .popn (2 )
644
648
kvs [key ] = val
645
649
self .push (kvs )
0 commit comments