摘要:
类变量紧接在类名后面定义,相当于java和c++的static变量 实例变量在__init__里定义,相当于java和c++的普通变量class DaoCassandra(): __pool = None __maps = {} __cfs = {} @classmethod def getColumnFamilyMap(cls,cf): """ get ColumnFamilyMap according to columnFamily name """ if(cf in cls.__maps): return cls.__maps[cf] if(cls.__pool is None): 阅读全文