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:
Damien George
2019-12-28 01:01:36 +11:00
parent b2e4a57289
commit b23bd6433c
2 changed files with 0 additions and 4 deletions

View File

@@ -241,10 +241,8 @@ MP_DEFINE_EXCEPTION(Exception, BaseException)
MP_DEFINE_EXCEPTION(AssertionError, Exception)
MP_DEFINE_EXCEPTION(AttributeError, Exception)
//MP_DEFINE_EXCEPTION(BufferError, Exception)
//MP_DEFINE_EXCEPTION(EnvironmentError, Exception) use OSError instead
MP_DEFINE_EXCEPTION(EOFError, Exception)
MP_DEFINE_EXCEPTION(ImportError, Exception)
//MP_DEFINE_EXCEPTION(IOError, Exception) use OSError instead
MP_DEFINE_EXCEPTION(LookupError, Exception)
MP_DEFINE_EXCEPTION(IndexError, LookupError)
MP_DEFINE_EXCEPTION(KeyError, LookupError)