1. The built-in function of the class: __doc__()
Purpose: Display the commented doc of the tired class, examples are as follows:
class TestClass :""" lalallala"""'''this is a doc with '''passprint(TestClass.__doc__)
①First of all, whether it is '''XXXX''' or """XXXX""" can be used as a descriptive doc for a class, there is no difference
②However, there can only be one descriptive doc for a class, and it is to find the doc that conforms to the rules in sequence.The above code, in order, the doc of the class in the above example is output by the __doc__() built-in function: lalallala
Then, if """lalallala""" is commented out, the output of __doc__ is: this is a doc with
2.