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

Method set_name

crates/stdlib/src/_asyncio.rs:1603–1611  ·  view source on GitHub ↗
(&self, name: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1601
1602 #[pymethod]
1603 fn set_name(&self, name: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
1604 let name = if !name.fast_isinstance(vm.ctx.types.str_type) {
1605 name.str(vm)?.into()
1606 } else {
1607 name
1608 };
1609 *self.task_name.write() = Some(name);
1610 Ok(())
1611 }
1612
1613 #[pymethod]
1614 fn get_loop(&self, vm: &VirtualMachine) -> PyResult {

Callers

nothing calls this directly

Calls 4

fast_isinstanceMethod · 0.80
SomeClass · 0.50
strMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected