python 函數類型

屬性 描述
__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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章