@@ -330,11 +330,11 @@ def _translate_call(self, func, args, keywords, starargs=None, kwargs=None, loca
330
330
initial_args = args [:]
331
331
args = []
332
332
if starargs : # python3.4
333
- initial_args .append (ast .Started ( ast . starargs ))
333
+ initial_args .append (ast .Starred ( starargs , None ))
334
334
335
335
for arg in initial_args :
336
- if isinstance (arg , ast .Starred ):
337
- many_arg = self ._translate_node (arg )
336
+ if isinstance (arg , ast .Starred ):
337
+ many_arg = self ._translate_node (arg . value )
338
338
if isinstance (many_arg ['pseudo_type' ], list ) and many_arg ['pseudo_type' ][0 ] == 'Tuple' :
339
339
args += [{
340
340
'type' : 'index' ,
@@ -343,7 +343,7 @@ def _translate_call(self, func, args, keywords, starargs=None, kwargs=None, loca
343
343
'pseudo_type' : t
344
344
}
345
345
for j , t
346
- in enumerate (many_arg ['pseudo_type' ][1 :])]
346
+ in enumerate (many_arg ['pseudo_type' ][1 :])]
347
347
348
348
else :
349
349
raise translation_error ("pseudo-python supports <call>(..*args) only for Tuple *args, because otherwise it doesn't know the exact arg count at compile time" ,
@@ -707,8 +707,8 @@ def _translate_binop(self, op, left, right, location):
707
707
elements = right_node ['elements' ]
708
708
else :
709
709
elements = [{
710
- 'type' : 'index' ,
711
- 'sequence' : right_node ,
710
+ 'type' : 'index' ,
711
+ 'sequence' : right_node ,
712
712
'index' : {
713
713
'value' : j ,
714
714
'pseudo_type' : 'Int' ,
@@ -717,7 +717,7 @@ def _translate_binop(self, op, left, right, location):
717
717
'pseudo_type' : right_node ['pseudo_type' ][j + 1 ] if right_node ['pseudo_type' ][0 ] == 'Tuple' else right_node ['pseudo_type' ][1 ]
718
718
}
719
719
for j
720
- in range (count )]
720
+ in range (count )]
721
721
else :
722
722
elements = [right_node ]
723
723
@@ -741,7 +741,7 @@ def _translate_binop(self, op, left, right, location):
741
741
raise type_check_error ('%s expects an int' ,
742
742
location , self .lines [location [0 ]],
743
743
wrong_type = elements [j ]['pseudo_type' ])
744
- words .append ({'type' : 'interpolation_placeholder' , 'value' : elements [j ], 'pseudo_type' : elements [j ]['pseudo_type' ], 'index' : j })
744
+ words .append ({'type' : 'interpolation_placeholder' , 'value' : elements [j ], 'pseudo_type' : elements [j ]['pseudo_type' ], 'index' : j })
745
745
words .append ({'type' : 'interpolation_literal' , 'value' : left_node ['value' ][v :], 'pseudo_type' : 'String' })
746
746
747
747
return {
@@ -1303,7 +1303,7 @@ def _translate_subscript(self, value, slice, ctx, location):
1303
1303
'function' : 'index' ,
1304
1304
'args' : [z ],
1305
1305
'pseudo_type' : 'String'
1306
- }
1306
+ }
1307
1307
result = {
1308
1308
'type' : 'index' ,
1309
1309
'sequence' : value_node ,
0 commit comments