You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
308 B
14 lines
308 B
4 years ago
|
"""
|
||
|
categories: Core,Functions
|
||
|
description: Function objects do not have the ``__module__`` attribute
|
||
|
cause: MicroPython is optimized for reduced code size and RAM usage.
|
||
|
workaround: Use ``sys.modules[function.__globals__['__name__']]`` for non-builtin modules.
|
||
|
"""
|
||
|
|
||
|
|
||
|
def f():
|
||
|
pass
|
||
|
|
||
|
|
||
|
print(f.__module__)
|