Commit 8bb84cc6 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/cpydiff/core_function_userattr: Clarify, fill in cause and workaround.

parent 58ecbc77
"""
categories: Core,Functions
description: Assign instance variable to function
cause: Unknown
workaround: Unknown
"""
def f():
pass
f.x = 0
print(f.x)
"""
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment