We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3562b8f commit 17c3f9fCopy full SHA for 17c3f9f
vm/src/builtins.rs
@@ -11,7 +11,6 @@ use num_traits::{Signed, ToPrimitive};
11
use crate::compile;
12
use crate::import::import_module;
13
use crate::obj::objbool;
14
-use crate::obj::objdict;
15
use crate::obj::objint;
16
use crate::obj::objiter;
17
use crate::obj::objstr::{self, PyStringRef};
@@ -29,14 +28,7 @@ use crate::obj::objcode::PyCodeRef;
29
28
use crate::stdlib::io::io_open;
30
31
fn get_locals(vm: &VirtualMachine) -> PyObjectRef {
32
- let d = vm.new_dict();
33
- // TODO: implement dict_iter_items?
34
- let locals = vm.get_locals();
35
- let key_value_pairs = objdict::get_key_value_pairs(&locals);
36
- for (key, value) in key_value_pairs {
37
- objdict::set_item(&d, vm, &key, &value);
38
- }
39
- d
+ vm.get_locals()
40
}
41
42
fn dir_locals(vm: &VirtualMachine) -> PyObjectRef {
0 commit comments