@@ -340,7 +340,7 @@ impl VirtualMachine {
340
340
for i in 0 ..n {
341
341
let arg_name = & code_object. arg_names [ i] ;
342
342
let arg = & args. args [ i] ;
343
- self . ctx . set_item ( scope, arg_name, arg. clone ( ) ) ;
343
+ self . ctx . set_attr ( scope, arg_name, arg. clone ( ) ) ;
344
344
}
345
345
346
346
// Pack other positional arguments in to *args:
@@ -354,7 +354,7 @@ impl VirtualMachine {
354
354
355
355
// If we have a name (not '*' only) then store it:
356
356
if let Some ( vararg_name) = vararg {
357
- self . ctx . set_item ( scope, vararg_name, vararg_value) ;
357
+ self . ctx . set_attr ( scope, vararg_name, vararg_value) ;
358
358
}
359
359
} else {
360
360
// Check the number of positional arguments
@@ -372,7 +372,7 @@ impl VirtualMachine {
372
372
373
373
// Store when we have a name:
374
374
if let Some ( kwargs_name) = kwargs {
375
- self . ctx . set_item ( scope, & kwargs_name, d. clone ( ) ) ;
375
+ self . ctx . set_attr ( scope, & kwargs_name, d. clone ( ) ) ;
376
376
}
377
377
378
378
Some ( d)
@@ -391,7 +391,7 @@ impl VirtualMachine {
391
391
) ;
392
392
}
393
393
394
- self . ctx . set_item ( scope, & name, value) ;
394
+ self . ctx . set_attr ( scope, & name, value) ;
395
395
} else if let Some ( d) = & kwargs {
396
396
self . ctx . set_item ( d, & name, value) ;
397
397
} else {
@@ -434,7 +434,7 @@ impl VirtualMachine {
434
434
let arg_name = & code_object. arg_names [ i] ;
435
435
if !scope. contains_key ( arg_name) {
436
436
self . ctx
437
- . set_item ( scope, arg_name, available_defaults[ default_index] . clone ( ) ) ;
437
+ . set_attr ( scope, arg_name, available_defaults[ default_index] . clone ( ) ) ;
438
438
}
439
439
}
440
440
} ;
0 commit comments