diff options
| author | Damien George <damien@micropython.org> | 2025-01-20 22:23:48 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-02-11 16:51:50 +1100 |
| commit | ceb8ba60b4fea0c32e4977d0e45d5c0203b27b34 (patch) | |
| tree | 9c100e265c53509822ecc08155545701a370db6f /py/persistentcode.h | |
| parent | 62e821ccb82fd8362a8198ad59ccb51b8a5c441e (diff) | |
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>
Diffstat (limited to 'py/persistentcode.h')
0 files changed, 0 insertions, 0 deletions
