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

Function callable

crates/vm/src/stdlib/builtins.rs:82–84  ·  view source on GitHub ↗
(obj: PyObjectRef)

Source from the content-addressed store, hash-verified

80
81 #[pyfunction]
82 fn callable(obj: PyObjectRef) -> bool {
83 obj.is_callable()
84 }
85
86 #[pyfunction]
87 fn chr(i: PyIntRef, vm: &VirtualMachine) -> PyResult<CodePoint> {

Callers 15

_partial_newFunction · 0.85
__setstate__Method · 0.85
lru_cacheFunction · 0.85
__init__Method · 0.85
_callable_postfixMethod · 0.85
pickleFunction · 0.85
constructorFunction · 0.85
_signature_from_callableFunction · 0.85
register_archive_formatFunction · 0.85
_check_unpack_optionsFunction · 0.85

Calls 1

is_callableMethod · 0.80

Tested by 15

test_basic_examplesMethod · 0.68
assertRaisesMessageMethod · 0.68
test_callableMethod · 0.68
raisesMethod · 0.68
test_callableMethod · 0.68
get_exceptionMethod · 0.68
get_exceptionMethod · 0.68
test_subclassingMethod · 0.68