aboutsummaryrefslogtreecommitdiff
path: root/tests/cpydiff/core_function_userattr.py
blob: 297293908427d329a70865f8b26d42a5e993451f (plain)
1
2
3
4
5
6
7
8
9
10
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)