(obj: OptionalArg, vm: &VirtualMachine)
| 1153 | |
| 1154 | #[pyfunction] |
| 1155 | fn vars(obj: OptionalArg, vm: &VirtualMachine) -> PyResult { |
| 1156 | if let OptionalArg::Present(obj) = obj { |
| 1157 | obj.get_attr(identifier!(vm, __dict__), vm) |
| 1158 | .map_err(|_| vm.new_type_error("vars() argument must have __dict__ attribute")) |
| 1159 | } else { |
| 1160 | Ok(vm.current_locals()?.into()) |
| 1161 | } |
| 1162 | } |
| 1163 | |
| 1164 | #[pyfunction] |
| 1165 | pub fn __build_class__( |