Skip to content

Commit 4b353ea

Browse files
committed
fix
1 parent 883a884 commit 4b353ea

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

crates/vm/src/protocol/object.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,10 @@ impl PyObject {
707707
{
708708
return class_getitem.call((needle,), vm);
709709
}
710+
return Err(vm.new_type_error(format!(
711+
"type '{}' is not subscriptable",
712+
self.downcast_ref::<PyType>().unwrap().name()
713+
)));
710714
}
711715
Err(vm.new_type_error(format!("'{}' object is not subscriptable", self.class())))
712716
}

0 commit comments

Comments
 (0)