8000 func.__name__ not supported · Issue #614 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
func.__name__ not supported #614
Closed
Closed
@vext01

Description

@vext01

In Cpython somefunc.func_name contains the function name. This attribute is not available in Micro Python.

E.g. (using Ipython):

In [6]: def f(): pass

In [7]: f
Out[7]: <function __main__.f>

In [8]: f.func_name
Out[8]: 'f'

In MicroPython:

>>> def f(): pass
... 
>>> f
<function>
>>> f.func_name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'function' object has no attribute 'func_name'

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0