diff options
author | Damien George <damien.p.george@gmail.com> | 2019-12-28 01:01:36 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-28 01:01:36 +1100 |
commit | b23bd6433cd68830d32c0c68dbbf554942bb6ad0 (patch) | |
tree | dc6097932aac10281d0c7d7f18bf2f7899048e84 /py/modbuiltins.c | |
parent | b2e4a57289d17d6d4377880c5fc143b3d51f3678 (diff) | |
download | micropython-b23bd6433cd68830d32c0c68dbbf554942bb6ad0.tar.gz micropython-b23bd6433cd68830d32c0c68dbbf554942bb6ad0.zip |
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.
Diffstat (limited to 'py/modbuiltins.c')
-rw-r--r-- | py/modbuiltins.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/py/modbuiltins.c b/py/modbuiltins.c index a65f3beecf..5a0a3a3380 100644 --- a/py/modbuiltins.c +++ b/py/modbuiltins.c @@ -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 |