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

Method as_number

crates/vm/src/stdlib/_collections.rs:482–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480
481 impl AsNumber for PyDeque {
482 fn as_number() -> &'static PyNumberMethods {
483 static AS_NUMBER: PyNumberMethods = PyNumberMethods {
484 boolean: Some(|number, _vm| {
485 let zelf = number.obj.downcast_ref::<PyDeque>().unwrap();
486 Ok(!zelf.borrow_deque().is_empty())
487 }),
488 ..PyNumberMethods::NOT_IMPLEMENTED
489 };
490 &AS_NUMBER
491 }
492 }
493
494 impl AsSequence for PyDeque {

Callers

nothing calls this directly

Calls 4

borrow_dequeMethod · 0.80
SomeClass · 0.50
unwrapMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected