Skip to content

Commit 942dccf

Browse files
committed
Use fast_isinstance
1 parent 42e6eec commit 942dccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/frame.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl ExecutingFrame<'_> {
541541
let result = self.locals.mapping().subscript(name, vm);
542542
match result {
543543
Ok(x) => self.push_value(x),
544-
Err(e) if e.class().is(vm.ctx.exceptions.key_error) => {
544+
Err(e) if e.fast_isinstance(vm.ctx.exceptions.key_error) => {
545545
self.push_value(self.load_global_or_builtin(name, vm)?);
546546
}
547547
Err(e) => return Err(e),

0 commit comments

Comments
 (0)