summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/mandel.py6
-rw-r--r--examples/micropython.py8
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/mandel.py b/examples/mandel.py
index 996132a91..d2b34fff8 100644
--- a/examples/mandel.py
+++ b/examples/mandel.py
@@ -1,3 +1,9 @@
+try:
+ import micropython
+except:
+ pass
+
+
def mandelbrot():
# returns True if c, complex, is in the Mandelbrot set
@micropython.native
diff --git a/examples/micropython.py b/examples/micropython.py
new file mode 100644
index 000000000..091c92deb
--- /dev/null
+++ b/examples/micropython.py
@@ -0,0 +1,8 @@
+# micropython module placeholder for CPython
+
+# Dummy function decorators
+
+def nodecor(x):
+ return x
+
+byte_code = native = viper = nodecor