diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-29 14:00:03 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-29 14:00:03 +0000 |
commit | 21a07dc50f764b72e6cb1d109160b17545db70ba (patch) | |
tree | 2e61ff9a1d869ff75431a5858a7bafb5095e4789 /tests/basics/with-continue.py | |
parent | b04be056fe7694cdfe2df4c5103546a39d4fd8b2 (diff) | |
parent | e7286ef2c7db77879178f45f6055d8af2fc68281 (diff) | |
download | micropython-21a07dc50f764b72e6cb1d109160b17545db70ba.tar.gz micropython-21a07dc50f764b72e6cb1d109160b17545db70ba.zip |
Merge pull request #389 from pfalcon/with-statement
With statement implementation
Diffstat (limited to 'tests/basics/with-continue.py')
-rw-r--r-- | tests/basics/with-continue.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/with-continue.py b/tests/basics/with-continue.py new file mode 100644 index 0000000000..fc2b24bd4b --- /dev/null +++ b/tests/basics/with-continue.py @@ -0,0 +1,14 @@ +class CtxMgr: + + def __enter__(self): + print("__enter__") + return self + + def __exit__(self, a, b, c): + print("__exit__", repr(a), repr(b)) + +for i in range(5): + print(i) + with CtxMgr(): + if i == 3: + continue |