micropython/tests/cpydiff/types_exception_instancevar.py

10 wiersze
257 B
Python

"""
categories: Types,Exception
description: User-defined attributes for builtin exceptions are not supported
cause: MicroPython is highly optimized for memory usage.
workaround: Use user-defined exception subclasses.
"""
e = Exception()
e.x = 0
print(e.x)