mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py/objfun: Implement function.__code__ and function constructor.
This allows retrieving the code object of a function using `function.__code__`, and then reconstructing a function from a code object using `FunctionType(code_object)`. This feature is controlled by `MICROPY_PY_FUNCTION_ATTRS_CODE` and is enabled at the full-features level. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
1
tests/basics/fun_code_micropython.py.exp
Normal file
1
tests/basics/fun_code_micropython.py.exp
Normal file
@@ -0,0 +1 @@
|
||||
AttributeError
|
||||
Reference in New Issue
Block a user