MCPcopy Index your code
hub / github.com/RustPython/RustPython / new_pyobj

Method new_pyobj

crates/vm/src/vm/vm_new.rs:39–41  ·  view source on GitHub ↗

Create a new python object

(&self, value: impl ToPyObject)

Source from the content-addressed store, hash-verified

37impl VirtualMachine {
38 /// Create a new python object
39 pub fn new_pyobj(&self, value: impl ToPyObject) -> PyObjectRef {
40 value.to_pyobject(self)
41 }
42
43 pub fn new_tuple(&self, value: impl IntoPyTuple) -> PyTupleRef {
44 value.into_pytuple(self)

Callers 15

bench_rustpython_codeFunction · 0.80
run_fileFunction · 0.80
run_rustpythonFunction · 0.80
py_mainFunction · 0.80
mainFunction · 0.80
to_pyobjectMethod · 0.80
inject_moduleMethod · 0.80
pystr_from_raw_cstrFunction · 0.80
strcollFunction · 0.80
strxfrmFunction · 0.80
enum_certificatesFunction · 0.80
fcntlFunction · 0.80

Calls 1

to_pyobjectMethod · 0.45

Tested by 2

test_insertFunction · 0.64
test_multiply_strFunction · 0.64