Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ __alloc__
Method
__alloc__
crates/vm/src/builtins/bytearray.rs:205–207 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
203
204
#[pymethod]
205
fn __alloc__(&self) -> usize {
206
self.inner().capacity()
207
}
208
209
fn __len__(&self) -> usize {
210
self.borrow_buf().len()
Callers
4
test_objecttypes
Method · 0.80
test_alloc
Method · 0.80
g
Method · 0.80
test_init_alloc
Method · 0.80
Calls
2
capacity
Method · 0.45
inner
Method · 0.45
Tested by
4
test_objecttypes
Method · 0.64
test_alloc
Method · 0.64
g
Method · 0.64
test_init_alloc
Method · 0.64