汇总了一些python高阶编程的范例,比如list comprehension, generator, Decorators, map, reduce, Higher-order function...大家一起学习学习:
https://github.com/hupantingxue/advancedpython
https://github.com/hupantingxue/advancedpython
1
Froshal Mar 19, 2014
谢谢分享
|
2
a2z Mar 19, 2014 感谢分享
|
3
raquelken Mar 19, 2014
分享是好事,但是希望能写正确。。。
|
4
cocorosiekz Mar 19, 2014 python官网有how to系列,其中有函数式编程部分,地址http://docs.python.org/2/howto/functional.html
|
5
hupantingxue OP @raquelken 有问题可以直接给我提issue,谢谢!
|
6
ljcarsenal Mar 19, 2014 via Android
马克
|
7
yakczh Mar 19, 2014
问个低阶的问题
怎么用format格式化tuple的子项 比如 tu=('Server', 'Apache/2.2.4 ') print(" {0}:{1} ".format(tu)) 想输出 Server : Apache/2.2.4 但是提示tuple index out of range |
10
lsj5031 Mar 19, 2014
@yakczh
unpack the tuple/sequence/collection into positional arguments. 因为format要跟的参数不是这个tuple,而是你那两个string。 |
11
hupantingxue OP 更新了一下
|