diff options
author | Petr Viktorin <encukou@gmail.com> | 2020-01-14 16:47:20 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-02-06 00:41:55 +1100 |
commit | e6c9800645ba70db6289f9d81b76320454a1938f (patch) | |
tree | b364660a6fb52fdfd26fabb593d011ff6b19f876 /py/stackctrl.h | |
parent | d6a1e45caaca886b3fbd6adea0e83ed080a10144 (diff) | |
download | micropython-e6c9800645ba70db6289f9d81b76320454a1938f.tar.gz micropython-e6c9800645ba70db6289f9d81b76320454a1938f.zip |
py/compile: Allow 'return' outside function in minimal builds.
A 'return' statement on module/class level is not correct Python, but
nothing terribly bad happens when it's allowed. So remove the check unless
MICROPY_CPYTHON_COMPAT is on.
This is similar to MicroPython's treatment of 'import *' in functions
(except 'return' has unsurprising behavior if it's allowed).
Diffstat (limited to 'py/stackctrl.h')
0 files changed, 0 insertions, 0 deletions