Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3647516
  • 博文数量: 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-03-20 11:19:41

  (1) printf(“%d”,sizeof(‘A’));//输出4 分析:sizeof()是一个表达式,字符’A’由char类型提升到int,所以打印出是4(int的大小),而不是1(char的大小)。   (2)char a,b; printf ( " the size of the result of a+b&.........【阅读全文】

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

发布时间:2019-03-19 14:50:37

https://mp.weixin.qq.com/s/k6HS5g-rohZrxY_BDJa4rw“云计算”这个词,相信大家都非常熟悉了。作为IT行业的热门技术,它频繁出现在各大媒体的新闻报道中。BAT这样的互联网企业,也经常把它挂在嘴边。相信很多人都想学习云计算,跟上技术潮流。如果对云计算有一定了解的话,应该会或多或少地听到这些名词——Op.........【阅读全文】

阅读(769) | 评论(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]   .........【阅读全文】

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

发布时间:2019-03-18 14:48:31

转自:https://blog.csdn.net/pro_leo/article/details/41786397(有修订)1、Python缓存作用:  a、提高执行效率。  b、减少内存负担。2、首先,我们看下面这一段code:>>> num1, num2 = 1, 1 >>> print num1 is num2 True >>> id(num1), id(num2) (3965416, 3965416) >>> num.........【阅读全文】

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

登录 注册