mirror of
https://github.com/micropython/micropython.git
synced 2025-09-04 08:50:27 +02:00
py: Clean up commented-out code and comments about exception hierarchy.
In CPython, EnvironmentError and IOError are now aliases of OSError so no need to have them listed in the code. OverflowError inherits from ArithmeticError because it's intended to be raised "when the result of an arithmetic operation is too large to be represented" (per CPython docs), and MicroPython aims to match the CPython exception hierarchy.
This commit is contained in:
@@ -762,8 +762,6 @@ STATIC const mp_rom_map_elem_t mp_module_builtins_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_ViperTypeError), MP_ROM_PTR(&mp_type_ViperTypeError) },
|
||||
#endif
|
||||
{ MP_ROM_QSTR(MP_QSTR_ZeroDivisionError), MP_ROM_PTR(&mp_type_ZeroDivisionError) },
|
||||
// Somehow CPython managed to have OverflowError not inherit from ValueError ;-/
|
||||
// TODO: For MICROPY_CPYTHON_COMPAT==0 use ValueError to avoid exc proliferation
|
||||
|
||||
// Extra builtins as defined by a port
|
||||
MICROPY_PORT_BUILTINS
|
||||
|
Reference in New Issue
Block a user