mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Fix PyMappingProxy::get
This commit is contained in:
@@ -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