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

Method name

crates/vm/src/builtins/type.rs:1185–1195  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1183 }
1184
1185 pub fn name(&self) -> BorrowedValue<'_, str> {
1186 self.name_inner(
1187 |name| name.rsplit_once('.').map_or(name, |(_, name)| name).into(),
1188 |ext| {
1189 PyRwLockReadGuard::map(ext.name.read(), |name: &PyUtf8StrRef| -> &str {
1190 name.as_str()
1191 })
1192 .into()
1193 },
1194 )
1195 }
1196
1197 // Type Data Slot API - CPython's PyObject_GetTypeData equivalent
1198

Callers 15

slot_initMethod · 0.45
slot_callMethod · 0.45
__name__Method · 0.45
slot_strMethod · 0.45
repr_strMethod · 0.45
__name__Method · 0.45
__qualname__Method · 0.45
slot_newMethod · 0.45
set___class__Method · 0.45
__name__Method · 0.45
slot_newMethod · 0.45

Calls 3

name_innerMethod · 0.80
readMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected