(exit_code_arg: OptionalArg<PyObjectRef>, vm: &VirtualMachine)
| 972 | |
| 973 | #[pyfunction] |
| 974 | pub fn exit(exit_code_arg: OptionalArg<PyObjectRef>, vm: &VirtualMachine) -> PyResult { |
| 975 | let code = exit_code_arg.unwrap_or_else(|| vm.ctx.new_int(0).into()); |
| 976 | Err(vm.new_exception(vm.ctx.exceptions.system_exit.to_owned(), vec![code])) |
| 977 | } |
| 978 | |
| 979 | #[derive(Debug, Default, FromArgs)] |
| 980 | pub struct PrintOptions { |
no test coverage detected