circuitpython/tests/cpydiff/core_function_userattr.py
Scott Shawcroft b057fb8a4b
codeformat
2021-04-19 22:22:44 -07:00

15 lines
263 B
Python

"""
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)