1 parent 58ecbc7 commit 8bb84ccCopy full SHA for 8bb84cc
2 files changed
tests/cpydiff/core_function_instancevar.py
tests/cpydiff/core_function_userattr.py
@@ -0,0 +1,11 @@
1
+"""
2
+categories: Core,Functions
3
+description: User-defined attributes for functions are not supported
4
+cause: MicroPython is highly optimized for memory usage.
5
+workaround: Use external dictionary, e.g. ``FUNC_X[f] = 0``.
6
7
+def f():
8
+ pass
9
+
10
+f.x = 0
11
+print(f.x)
0 commit comments