Python中類方法定義常見的三種實現方式

# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- class Person(object):     def Work():         print(" I am working!")     @classmethod   #第一種方法:加裝飾
相關文章
相關標籤/搜索