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

Method with_locals

crates/vm/src/frame.rs:499–503  ·  view source on GitHub ↗

Create with an already-initialized locals mapping (non-NEWLOCALS frames).

(locals: ArgMapping)

Source from the content-addressed store, hash-verified

497impl FrameLocals {
498 /// Create with an already-initialized locals mapping (non-NEWLOCALS frames).
499 fn with_locals(locals: ArgMapping) -> Self {
500 let cell = OnceCell::new();
501 let _ = cell.set(locals);
502 Self { inner: cell }
503 }
504
505 /// Create an empty lazy locals (for NEWLOCALS frames).
506 /// The dict will be created on first access.

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected