__init__Called after the class instance is created, some initialization of the instance of the current object, no return value __name__A system variable that identifies the name of the module __call__Whether it can be called __main__Main module module name (whether current module or import module) __new__A method that creates an instance of a class, called when an object is created, returns an instance of the current object __init__.pyThe import behavior of the primary control package __file__ represents the file itself, and the output is an absolute pathSys.path.append (Os.path.dirname (Os.path.dirname (Os.path.abspath (__file__))) __dict__Python has all the objects, each object has multiple properties (attribute), and Python has a unified management scheme for attributes.The difference between __dict__ and Dir ():Dir () is a function that returns a list;__dict__ is a dictionary, the key is the property name, the value is the property value;Dir () is used to find all the properties of an object, including the attributes in __dict__, and __dict__ is a subset of Dir ();? Not all objects have the __dict__ property. Many of the built-in types have no __dict__ properties, such as list, and you need to use DIR () to list all the properties of the object. __all__Define the __ALL__ variable at the beginning of the module, import the module, only the variables or functions that exist in the __all__ can be found, others cannot be called
Python double underline method explanation