This commit is contained in:
blueloveTH 2023-10-13 13:24:52 +08:00
parent 5ecd59f11c
commit 8b155ff95c

View File

@ -941,7 +941,7 @@ PyObject* VM::getattr(PyObject* obj, StrName name, bool throw_err){
} }
// handle instance __dict__ // handle instance __dict__
if(!is_tagged(obj) && obj->is_attr_valid()){ if(!is_tagged(obj) && obj->is_attr_valid()){
PyObject* val = obj->attr().try_get(name); PyObject* val = obj->attr().try_get_likely_found(name);
if(val != nullptr) return val; if(val != nullptr) return val;
} }
if(cls_var != nullptr){ if(cls_var != nullptr){