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

Function get_copy_context

crates/stdlib/src/_asyncio.rs:2735–2741  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

2733 }
2734
2735 fn get_copy_context(vm: &VirtualMachine) -> PyResult<PyObjectRef> {
2736 let contextvars = vm.import("contextvars", 0)?;
2737 let copy_context = vm
2738 .get_attribute_opt(contextvars, vm.ctx.intern_str("copy_context"))?
2739 .ok_or_else(|| vm.new_attribute_error("copy_context not found"))?;
2740 copy_context.call((), vm)
2741 }
2742
2743 fn get_cancelled_error_type(vm: &VirtualMachine) -> PyResult<PyTypeRef> {
2744 let module = vm.import("asyncio.exceptions", 0)?;

Callers 2

add_done_callbackMethod · 0.85
py_initMethod · 0.85

Calls 5

ok_or_elseMethod · 0.80
get_attribute_optMethod · 0.80
intern_strMethod · 0.80
importMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected