Closed microbit-carlos closed 2 years ago
Trying the same in CPython doesn't have that dunder attribute.
CPython does have it, it's just not listed by dir(...)
. Try my_module.__class__
under CPython and you get the same as MicroPython.
We're curious to know why CPython doesn't show this, but happy to close this as an issue :)
We're curious to know why CPython doesn't show this
Honestly, I don't know! Maybe it filters out __class__
from dir on modules.
With a
my_module.py
file that only containsFOO = 0
:I don't think the
__class__
attribute here is correct? Trying the same in CPython doesn't have that dunder attribute.