python @staticmethod和@classmethod的做用與區別

參考:http://blog.csdn.net/handsomekang/article/details/9615239python 通常來講,要使用某個類的方法,須要先實例化一個對象再調用方法。ide 如咱們定義了一個 函數 class A (): 編碼   def __init__(): spa print "A" .net def show():orm print "test"對象   A
相關文章
相關標籤/搜索