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

Method __getnewargs__

crates/vm/src/builtins/bytes.rs:529–532  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

527
528 #[pymethod]
529 fn __getnewargs__(&self, vm: &VirtualMachine) -> PyTupleRef {
530 let param: Vec<PyObjectRef> = self.elements().map(|x| x.to_pyobject(vm)).collect();
531 PyTuple::new_ref(param, &vm.ctx)
532 }
533
534 // TODO: Uncomment when Python adds __class_getitem__ to bytes
535 // #[pyclassmethod]

Callers

nothing calls this directly

Calls 4

collectMethod · 0.80
mapMethod · 0.45
elementsMethod · 0.45
to_pyobjectMethod · 0.45

Tested by

no test coverage detected