摘要: 转载于:http://genggeng.iteye.com/blog/1290438 在python中,这两个是python中的可变参数,*arg表示任意多个无名参数,类型为tuple,**kwargs表示关键字参数,为dict,使用时需将*arg放在**kwargs之前,否则会有“SyntaxEr 阅读全文
posted @ 2016-12-02 22:05 dshed 阅读(1124) 评论(0) 推荐(0)
摘要: 例: def f(): print 'generator' m = yield [1,2,90] print 'got the object : ',m yield o = f() (1) outVal = o.next() (2) o.send('abc') (3) o.next() (4) 首先 阅读全文
posted @ 2016-12-01 22:23 dshed 阅读(162) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示