micropython: add micropython component
This commit is contained in:
14
components/language/micropython/tests/basics/with_break.py
Normal file
14
components/language/micropython/tests/basics/with_break.py
Normal file
@@ -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:
|
||||
break
|
Reference in New Issue
Block a user