Skip to content

Module in the filesystem has the __class__ dunder #104

@microbit-carlos

Description

@microbit-carlos

With a my_module.py file that only contains FOO = 0:

MicroPython 569e361 on 2022-06-20; micro:bit v2.0.0 with nRF52833
Type "help()" for more information.
>>> import my_module
>>> dir(my_module)
['__class__', '__name__', 'FOO']
>>> my_module.__class__
<class 'module'>

I don't think the __class__ attribute here is correct? Trying the same in CPython doesn't have that dunder attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions