We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 355604d commit 914bd74Copy full SHA for 914bd74
1 file changed
vm/src/protocol/number.rs
@@ -444,6 +444,11 @@ impl<'a> PyNumber<'a> {
444
// PyNumber_Check
445
pub fn check(obj: &PyObject) -> bool {
446
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>()
452
let has_number = cls
453
.mro_find_map(|x| {
454
let methods = &x.slots.as_number;
0 commit comments