Open LuckyKoala opened 5 years ago
https://twodam.net/customize-class-in-Python
1.实现一个较为完整的定制类,支持初始化,输出自定义实例、类对象信息,len()调用,for in,[],获取默认属性,以及调用instance():12345678910111213141516171819202122232425262728293031323334353637class Custom(object): slots = ('_name','index')
https://twodam.net/customize-class-in-Python
1.实现一个较为完整的定制类,支持初始化,输出自定义实例、类对象信息,len()调用,for in,[],获取默认属性,以及调用instance():12345678910111213141516171819202122232425262728293031323334353637class Custom(object): slots = ('_name','index')