(cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine)
| 738 | type Args = FuncArgs; |
| 739 | |
| 740 | fn slot_new(cls: PyTypeRef, args: FuncArgs, vm: &VirtualMachine) -> PyResult { |
| 741 | if cls.is(Self::class(&vm.ctx)) && !args.kwargs.is_empty() { |
| 742 | return Err(vm.new_type_error("BaseException() takes no keyword arguments")); |
| 743 | } |
| 744 | Self::new(args.args, vm) |
| 745 | .into_ref_with_type(vm, cls) |
| 746 | .map(Into::into) |
| 747 | } |
| 748 | |
| 749 | fn py_new(_cls: &Py<PyType>, _args: FuncArgs, _vm: &VirtualMachine) -> PyResult<Self> { |
| 750 | unimplemented!("use slot_new") |
nothing calls this directly
no test coverage detected