News

On the other hand, Python has highly flexible built-in test options to complement its dynamism—e.g., it has assertions for checking a wide range of common conditions including raised exceptions.
They also listed the keynote improvements in Python 3.11: “better tracebacks”, “faster Python”, “exception groups and except*”, in addition to offering various improvements to typing.
Python exceptions in PyO3 can be created in Rust code with the create_exception! macro, or by importing one of a few predefined standard exceptions with the import_exception! macro.