diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-01 20:08:18 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-01 20:08:18 +0000 |
commit | cbddb279bba5395ad444cb46d78223c8f9064c56 (patch) | |
tree | 773644ba542ebb307d036526cdae4f5086e65633 /tests/basics | |
parent | a908202d60e15d37b47fb32b414658237119cd60 (diff) | |
download | micropython-cbddb279bba5395ad444cb46d78223c8f9064c56.tar.gz micropython-cbddb279bba5395ad444cb46d78223c8f9064c56.zip |
py: Implement break/continue from an exception with finally.
Still todo: break/continue from within the finally block itself.
Diffstat (limited to 'tests/basics')
-rw-r--r-- | tests/basics/try-finally-break.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/try-finally-break.py b/tests/basics/try-finally-break.py new file mode 100644 index 0000000000..af1704da95 --- /dev/null +++ b/tests/basics/try-finally-break.py @@ -0,0 +1,14 @@ +for i in range(4): + print(i) + try: + while True: + try: + try: + break + finally: + print('finally 1') + finally: + print('finally 2') + print('here') + finally: + print('finnaly 3') |