micropython/tests/basics/with_break.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
254 B
Python
Raw Normal View History

2014-03-29 02:11:24 +00:00
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:
break