Skip to content

Commit c8742a0

Browse files
committed
Add dummy micropython module to enable mandel.py run with CPython.
1 parent d0db3d3 commit c8742a0

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

examples/mandel.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
try:
2+
import micropython
3+
except:
4+
pass
5+
6+
17
def mandelbrot():
28
# returns True if c, complex, is in the Mandelbrot set
39
@micropython.native

examples/micropython.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# micropython module placeholder for CPython
2+
3+
# Dummy function decorators
4+
5+
def nodecor(x):
6+
return x
7+
8+
byte_code = native = viper = nodecor

0 commit comments

Comments
 (0)