MCPcopy 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_objecttypesMethod · 0.80
test_allocMethod · 0.80
gMethod · 0.80
test_init_allocMethod · 0.80

Calls 2

capacityMethod · 0.45
innerMethod · 0.45

Tested by 4

test_objecttypesMethod · 0.64
test_allocMethod · 0.64
gMethod · 0.64
test_init_allocMethod · 0.64