diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-05-02 03:42:46 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-05-02 03:43:21 +0300 |
commit | 8bb84cc627b933ff3eb9931a97197e459811fe36 (patch) | |
tree | 495651d1ad93052ccaaee7566b6f0407de00869b | |
parent | 58ecbc7752116be123598daec7c2be77d8681f8c (diff) | |
download | micropython-8bb84cc627b933ff3eb9931a97197e459811fe36.tar.gz micropython-8bb84cc627b933ff3eb9931a97197e459811fe36.zip |
tests/cpydiff/core_function_userattr: Clarify, fill in cause and workaround.
-rw-r--r-- | tests/cpydiff/core_function_instancevar.py | 11 | ||||
-rw-r--r-- | tests/cpydiff/core_function_userattr.py | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/cpydiff/core_function_instancevar.py b/tests/cpydiff/core_function_instancevar.py deleted file mode 100644 index ab027b1662..0000000000 --- a/tests/cpydiff/core_function_instancevar.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -categories: Core,Functions -description: Assign instance variable to function -cause: Unknown -workaround: Unknown -""" -def f(): - pass - -f.x = 0 -print(f.x) diff --git a/tests/cpydiff/core_function_userattr.py b/tests/cpydiff/core_function_userattr.py new file mode 100644 index 0000000000..2972939084 --- /dev/null +++ b/tests/cpydiff/core_function_userattr.py @@ -0,0 +1,11 @@ +""" +categories: Core,Functions +description: User-defined attributes for functions are not supported +cause: MicroPython is highly optimized for memory usage. +workaround: Use external dictionary, e.g. ``FUNC_X[f] = 0``. +""" +def f(): + pass + +f.x = 0 +print(f.x) |