Add OSError, Python 3.3 generic I/O exception.

This commit is contained in:
Paul Sokolovsky 2014-01-07 19:35:39 +02:00
parent fd04bb3bac
commit 1e40840b3b
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Q(NameError)
Q(SyntaxError)
Q(TypeError)
Q(ValueError)
Q(OSError)
Q(abs)
Q(all)

View File

@ -84,6 +84,7 @@ void rt_init(void) {
mp_qstr_map_lookup(&map_builtins, MP_QSTR_TypeError, true)->value = mp_obj_new_exception(MP_QSTR_TypeError);
mp_qstr_map_lookup(&map_builtins, MP_QSTR_SyntaxError, true)->value = mp_obj_new_exception(MP_QSTR_SyntaxError);
mp_qstr_map_lookup(&map_builtins, MP_QSTR_ValueError, true)->value = mp_obj_new_exception(MP_QSTR_ValueError);
mp_qstr_map_lookup(&map_builtins, MP_QSTR_OSError, true)->value = mp_obj_new_exception(MP_QSTR_OSError);
// built-in objects
mp_qstr_map_lookup(&map_builtins, MP_QSTR_Ellipsis, true)->value = mp_const_ellipsis;