屬性 | 描述 |
---|---|
__doc__ |
方法的文檔 |
__name__ |
方法的名稱 |
__qualname__ |
|
__module__ |
方法所在的模塊名 |
__defaults__ |
A tuple containing default argument values for those arguments that have defaults |
__code__ |
|
__globals__ |
A reference to the dictionary that holds the function’s global variables |
__dict__ |
The namespace supporting arbitrary function attributes. |
__closure__ |
None or a tuple of cells that contain bindings for the function’s free variables. |
__annotations__ |
A dict containing annotations of parameters. |
__kwdefaults__ |
A dict containing defaults for keyword-only parameters. |
https://docs.python.org/3/reference/datamodel.html#types