py: Remove some unnecessary exception objects.

This commit is contained in:
Damien George
2014-03-22 23:40:02 +00:00
parent 3ec0a1a32d
commit c91097223d
3 changed files with 6 additions and 37 deletions

View File

@@ -149,17 +149,13 @@ STATIC const mp_builtin_elem_t builtin_table[] = {
{ MP_QSTR_AssertionError, (mp_obj_t)&mp_type_AssertionError },
{ MP_QSTR_AttributeError, (mp_obj_t)&mp_type_AttributeError },
{ MP_QSTR_BufferError, (mp_obj_t)&mp_type_BufferError },
{ MP_QSTR_BytesWarning, (mp_obj_t)&mp_type_BytesWarning },
{ MP_QSTR_DeprecationWarning, (mp_obj_t)&mp_type_DeprecationWarning },
{ MP_QSTR_EOFError, (mp_obj_t)&mp_type_EOFError },
{ MP_QSTR_EnvironmentError, (mp_obj_t)&mp_type_EnvironmentError },
{ MP_QSTR_Exception, (mp_obj_t)&mp_type_Exception },
{ MP_QSTR_FloatingPointError, (mp_obj_t)&mp_type_FloatingPointError },
{ MP_QSTR_FutureWarning, (mp_obj_t)&mp_type_FutureWarning },
{ MP_QSTR_GeneratorExit, (mp_obj_t)&mp_type_GeneratorExit },
{ MP_QSTR_IOError, (mp_obj_t)&mp_type_IOError },
{ MP_QSTR_ImportError, (mp_obj_t)&mp_type_ImportError },
{ MP_QSTR_ImportWarning, (mp_obj_t)&mp_type_ImportWarning },
{ MP_QSTR_IndentationError, (mp_obj_t)&mp_type_IndentationError },
{ MP_QSTR_IndexError, (mp_obj_t)&mp_type_IndexError },
{ MP_QSTR_KeyError, (mp_obj_t)&mp_type_KeyError },
@@ -169,21 +165,15 @@ STATIC const mp_builtin_elem_t builtin_table[] = {
{ MP_QSTR_NotImplementedError, (mp_obj_t)&mp_type_NotImplementedError },
{ MP_QSTR_OSError, (mp_obj_t)&mp_type_OSError },
{ MP_QSTR_OverflowError, (mp_obj_t)&mp_type_OverflowError },
{ MP_QSTR_PendingDeprecationWarning, (mp_obj_t)&mp_type_PendingDeprecationWarning },
{ MP_QSTR_ReferenceError, (mp_obj_t)&mp_type_ReferenceError },
{ MP_QSTR_ResourceWarning, (mp_obj_t)&mp_type_ResourceWarning },
{ MP_QSTR_RuntimeError, (mp_obj_t)&mp_type_RuntimeError },
{ MP_QSTR_RuntimeWarning, (mp_obj_t)&mp_type_RuntimeWarning },
{ MP_QSTR_SyntaxError, (mp_obj_t)&mp_type_SyntaxError },
{ MP_QSTR_SyntaxWarning, (mp_obj_t)&mp_type_SyntaxWarning },
{ MP_QSTR_SystemError, (mp_obj_t)&mp_type_SystemError },
{ MP_QSTR_SystemExit, (mp_obj_t)&mp_type_SystemExit },
{ MP_QSTR_TabError, (mp_obj_t)&mp_type_TabError },
{ MP_QSTR_TypeError, (mp_obj_t)&mp_type_TypeError },
{ MP_QSTR_UnboundLocalError, (mp_obj_t)&mp_type_UnboundLocalError },
{ MP_QSTR_UserWarning, (mp_obj_t)&mp_type_UserWarning },
{ MP_QSTR_ValueError, (mp_obj_t)&mp_type_ValueError },
{ MP_QSTR_Warning, (mp_obj_t)&mp_type_Warning },
{ MP_QSTR_ZeroDivisionError, (mp_obj_t)&mp_type_ZeroDivisionError },
{ MP_QSTR_StopIteration, (mp_obj_t)&mp_type_StopIteration },
// Somehow CPython managed to have OverflowError not inherit from ValueError ;-/