摘要: 一 time模块(时间模块)★★★★ 时间表现形式 在Python中,通常有这三种方式来表示时间:时间戳、元组(struct_time)、格式化的时间字符串:(1)时间戳(timestamp) :通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量。我们运行“type(t 阅读全文
posted @ 2017-04-26 16:52 ForeverPine 阅读(1999) 评论(1) 推荐(2) 编辑
摘要: 一、再看property 一个静态属性property本质就是实现了get,set,delete三种方法 1 class Foo: 2 @property 3 def AAA(self): 4 print('get的时候运行我啊') 5 6 @AAA.setter 7 def AAA(self,va 阅读全文
posted @ 2017-04-26 16:28 ForeverPine 阅读(1001) 评论(0) 推荐(0) 编辑
摘要: 目录: 一、 __getattribute__ 二、__str__,__repr__,__format__ 三、__doc__ 四、__module__和__class__ 一、 __getattribute__ 1 class Foo: 2 def __init__(self,x): 3 self 阅读全文
posted @ 2017-04-26 16:24 ForeverPine 阅读(337) 评论(0) 推荐(0) 编辑
TOP