摘要:
>>> import datetime>>> today=datetime.datetime.now()>>> todaydatetime.datetime(2015, 10, 12, 20, 33, 19, 634000)>>> type(today)>>> #type(today)这是一个时间类... 阅读全文
posted @ 2015-10-12 20:35
Xiao|Deng
阅读(223)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.csdn.net/yyt8yyt8/article/details/7030416#http://zhidao.baidu.com/link?url=zdkLDmHXmSqFlGp7uBWr... 阅读全文
posted @ 2015-10-12 20:30
Xiao|Deng
阅读(1490)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://www.bubuko.com/infodetail-313791.html#类的专有方法(__del__)'PS:析构函数只需要明白其用途,目前无需深入学习'#__init__#作用:当一个类实例删除... 阅读全文
posted @ 2015-10-12 19:34
Xiao|Deng
阅读(472)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://www.cnblogs.com/zyxstar2003/archive/2011/03/21/1989954.html#类的专有方法(__init__)#__init__,类似于构造函数#作用:初始化... 阅读全文
posted @ 2015-10-12 17:26
Xiao|Deng
阅读(246)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.chinaunix.net/uid-22521242-id-4081674.html'''#类的方法 共有方法 私有方法 类方法 静态方法静态方法是属于类的,一般方法... 阅读全文
posted @ 2015-10-12 17:04
Xiao|Deng
阅读(147)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.chinaunix.net/uid-22521242-id-4081674.html#一个关于类的案例class People(): #定义基本属性 name='' age... 阅读全文
posted @ 2015-10-12 16:44
Xiao|Deng
阅读(108)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.chinaunix.net/uid-22521242-id-4081674.html'''#类的方法 共有方法 私有方法 类方法 静态方法'''class MyCla... 阅读全文
posted @ 2015-10-12 16:38
Xiao|Deng
阅读(147)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.itpub.net/26250550/viewspace-1411768/#私有属性的另类访问方式#这里利用的好像是一种伪私有的机制class MyClass(): def __ini... 阅读全文
posted @ 2015-10-12 16:01
Xiao|Deng
阅读(161)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.csdn.net/wklken/article/details/6313265#获取类所有属性和查看帮助文档class MyClass(): def __init__(self... 阅读全文
posted @ 2015-10-12 15:53
Xiao|Deng
阅读(261)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.csdn.net/wklken/article/details/6313265#类的私有属性及私方法(请注意属性的传值方式)class MyClass(): def __ini... 阅读全文
posted @ 2015-10-12 15:44
Xiao|Deng
阅读(377)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.csdn.net/wklken/article/details/6313265#类的私有属性及私方法class MyClass(): def __init__(self,nam... 阅读全文
posted @ 2015-10-12 15:40
Xiao|Deng
阅读(368)
评论(0)
推荐(0)
摘要:
# -*- coding: utf-8 -*-#python 27#xiaodeng#http://blog.csdn.net/wklken/article/details/6313265#类的定义'''class : '''class MyClass(): def __init... 阅读全文
posted @ 2015-10-12 15:20
Xiao|Deng
阅读(147)
评论(0)
推荐(0)

浙公网安备 33010602011771号