Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3646277
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

发布时间:2019-04-05 13:37:09

1 Linux IOMMU Support  2 ===================  3   4 The architecture spec can be obtained from the below location.  5   6 http://www.intel.com/technology/virtualization/  7   8 This guide gives a quick cheat sheet for some basic understanding.  9 &nbs.........【阅读全文】

阅读(2080) | 评论(0) | 转发(0)

发布时间:2019-03-29 13:42:11

[root@localhost /]# cat zlg.py#!/bin/pythonclass zlg():    ha='hahahahahahaha'    def a(self):        self.ha='enenenenenen'        print 'aaaaaaaaaaa'        print self&nb.........【阅读全文】

阅读(1970) | 评论(0) | 转发(0)

发布时间:2019-03-29 13:29:42

面相对象程序设计中,类方法和静态方法是经常用到的两个术语。逻辑上讲:类方法是只能由类名调用;静态方法可以由类名或对象名进行调用。在C++中,静态方法与类方法逻辑上是等价的,只有一个概念,不会混淆。而在Python中,方法分为三类实例方法、类方法、静态方法。代码如下:class Test(object):def InstanceFun(.........【阅读全文】

阅读(1871) | 评论(0) | 转发(0)

发布时间:2019-03-19 13:59:35

[root@localhost /]# [root@localhost /]# [root@localhost /]# cat z.py #!/bin/pythonfrom functools import update_wrapper, wrapsdef a(b,c=3,d=[]):        '''aaaaaaaaaaaaaa'''    return a*2#print a.__name__#print a.__defaults__#print a.__doc__.........【阅读全文】

阅读(1731) | 评论(0) | 转发(0)

发布时间:2019-03-18 15:45:36

修饰器,增加缓存的意义[root@localhost /]# [root@localhost /]# cat zlg.py #!/bin/pythondef a(n,cache=None):    if cache is None:        cache={}    if n in cache:        return cache[n]   .........【阅读全文】

阅读(7523) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册