diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-12 12:35:08 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-12 12:35:08 +0000 |
commit | e5863d9301286418bfefd1fc07db5664759502f0 (patch) | |
tree | 783b5a0468d2913f69e2f99b564fa31b2ed1fd97 /py/compile.c | |
parent | c0876f7ca8cc56597a99144bf6fac0f021334c1a (diff) | |
download | micropython-e5863d9301286418bfefd1fc07db5664759502f0.tar.gz micropython-e5863d9301286418bfefd1fc07db5664759502f0.zip |
py: AssertionError is loaded from global, to match CPython.
Diffstat (limited to 'py/compile.c')
-rw-r--r-- | py/compile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c index 2e22d64262..b948f7aa47 100644 --- a/py/compile.c +++ b/py/compile.c @@ -1316,7 +1316,7 @@ void compile_nonlocal_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) { void compile_assert_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) { int l_end = comp_next_label(comp); c_if_cond(comp, pns->nodes[0], true, l_end); - EMIT(load_id, MP_QSTR_AssertionError); + EMIT(load_global, MP_QSTR_AssertionError); // we load_global instead of load_id, to be consistent with CPython if (!MP_PARSE_NODE_IS_NULL(pns->nodes[1])) { // assertion message compile_node(comp, pns->nodes[1]); |