Skip to content

Commit 914bd74

Browse files
authored
TODO comment
1 parent 355604d commit 914bd74

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

vm/src/protocol/number.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ impl<'a> PyNumber<'a> {
444444
// PyNumber_Check
445445
pub fn check(obj: &PyObject) -> bool {
446446
let cls = &obj.class();
447+
// TODO: when we finally have a proper slot inheritance, mro_find_map can be removed
448+
// methods.int.load().is_some()
449+
// || methods.index.load().is_some()
450+
// || methods.float.load().is_some()
451+
// || obj.downcastable::<PyComplex>()
447452
let has_number = cls
448453
.mro_find_map(|x| {
449454
let methods = &x.slots.as_number;

0 commit comments

Comments
 (0)