(zelf: &Py<Self>, attr: &Py<PyStr>, vm: &VirtualMachine)
| 978 | |
| 979 | impl GetAttr for Local { |
| 980 | fn getattro(zelf: &Py<Self>, attr: &Py<PyStr>, vm: &VirtualMachine) -> PyResult { |
| 981 | let l_dict = zelf.l_dict(vm); |
| 982 | if attr.as_bytes() == b"__dict__" { |
| 983 | Ok(l_dict.into()) |
| 984 | } else { |
| 985 | zelf.as_object() |
| 986 | .generic_getattr_opt(attr, Some(l_dict), vm)? |
| 987 | .ok_or_else(|| { |
| 988 | vm.new_attribute_error(format!( |
| 989 | "{} has no attribute '{}'", |
| 990 | zelf.class().name(), |
| 991 | attr |
| 992 | )) |
| 993 | }) |
| 994 | } |
| 995 | } |
| 996 | } |
| 997 | |
| 998 | impl SetAttr for Local { |
nothing calls this directly
no test coverage detected