mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix PyMappingProxy::get
This commit is contained in:
1 parent
f1e81c991e
commit
9ae07543a5
1 file changed
+1
-1
@@ -50,7 +50,7 @@ impl PyMappingProxy {
|
||||
let opt = match &self.mapping {
|
||||
MappingProxyInner::Class(class) => {
|
||||
let key = PyStrRef::try_from_object(vm, key)?;
|
||||
class.get_attr(key.as_str())
|
||||
class.attributes.read().get(key.as_str()).cloned()
|
||||
}
|
||||
MappingProxyInner::Dict(obj) => obj.get_item(key, vm).ok(),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user