摘要: 特点1. 在for i in range (xxx)的例子中,当print (i)时会一下打印出来所有的序列。如果用i = yield, 会引入__next__()的东西,它是一次只打印一个参数 特别2. 有N个变量,就要有N个__next__(),如下面例子中的eater('A')和eater(' 阅读全文
posted @ 2017-07-10 19:52 marcoxu 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 目的是当同一个装饰器应用到多个原始的函数时,恰恰原始的函数里面的形参数量又不一样多,如果有个没有行参,有的有一个,有的有多个。通过*args,**kwargs就可以满足所有原始的函数。 1 import time 2 3 def timer(func): 4 #def deco(): #part1 5 #def deco(arg1): #part2 6 ... 阅读全文
posted @ 2017-07-10 13:18 marcoxu 阅读(254) 评论(0) 推荐(0) 编辑
摘要: https://keithtenzer.com/2017/04/20/red-hat-openstack-platform-10-newton-installation-and-configuration-guide/ https://keithtenzer.com/2015/10/14/howto 阅读全文
posted @ 2017-07-06 16:22 marcoxu 阅读(569) 评论(0) 推荐(0) 编辑
摘要: centos7跟6比设置方法不一样 yum groupinstall "X Window System" -yyum grouplistyum groupinstall "GNOME Desktop" -yyum install tigervnc* -y cp /lib/systemd/system 阅读全文
posted @ 2017-07-06 16:12 marcoxu 阅读(303) 评论(0) 推荐(0) 编辑