Recently i am learning something about unicode in python2.7, and i want to know something about the base class of str, unicode, basestring, etc. and the relations of them, but i can’t find a proper way to look up the base class of them expect read the source code.
e.g.
class child(A):
pass
How can i know the base class of child using functions?
The only way is reading the source code?
You’re looking for
child.__bases__. A Python class can have multiple base classes.