How to use class.__mro__, class.mro (), class.__subclasses__ ()
This article introduces the relevant knowledge of "how to use class.__mro__, class.mro (), class.__subclasses__ ()". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The lab code shows:
# class Person (): # class Person (object): # class Person:class Person: # class Person (object): # class Person: # class Person (): it is possible to''define the base class Person''' def _ init__ (self, name, age):' 'initialize properties name and age'''self.name = name self.age = age def printInfo (self): print ('-I am an instance object Belongs to type: {0: ^ 35}-my name is: {1: {3}