>>> str.__bases__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'str' has no attribute '__bases__'
>>> import io
>>> io.StringIO.__bases__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'StringIO' has no attribute '__bases__'
>>> io.StringIO.__mro__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: type object 'StringIO' has no attribute '__mro__'
>>> dir(io.StringIO)
['__class__', '__enter__', '__exit__', '__name__', 'close', 'read', 'readinto', 'readline', 'write', 'flush', 'getvalue', 'seek']
MicroPython types appear not to implement
.mro(), in either the Python 2 or Python 3 forms:Is there a way to introspect the inheritance hierarchy in MP?
Also: Yikes, the MRO itself is not CPython-compliant.
Adapted from original post by @bskinn in #81 (comment)