(args: FuncArgs, vm: &VirtualMachine)
| 661 | |
| 662 | #[pyfunction] |
| 663 | fn breakpoint(args: FuncArgs, vm: &VirtualMachine) -> PyResult { |
| 664 | match vm |
| 665 | .sys_module |
| 666 | .get_attr(vm.ctx.intern_str("breakpointhook"), vm) |
| 667 | { |
| 668 | Ok(hook) => hook.as_ref().call(args, vm), |
| 669 | Err(_) => Err(vm.new_runtime_error("lost sys.breakpointhook")), |
| 670 | } |
| 671 | } |
| 672 | |
| 673 | #[pyfunction] |
| 674 | fn hex(number: ArgIndex) -> String { |