Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ __sizeof__
Method
__sizeof__
crates/vm/src/builtins/list.rs:254–257 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
252
253
#[pymethod]
254
fn __sizeof__(&self) -> usize {
255
core::mem::size_of::<Self>()
256
+ self.elements.read().capacity() * core::mem::size_of::<PyObjectRef>()
257
}
258
259
#[pymethod]
260
fn reverse(&self) {
Callers
nothing calls this directly
Calls
2
capacity
Method · 0.45
read
Method · 0.45
Tested by
no test coverage detected