推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
hupantingxue
V2EX  ›  Python

python advance program

  •  
  •   hupantingxue · Mar 19, 2014 · 5580 views
    This topic created in 4614 days ago, the information mentioned may be changed or developed.
    汇总了一些python高阶编程的范例,比如list comprehension, generator, Decorators, map, reduce, Higher-order function...大家一起学习学习:
    https://github.com/hupantingxue/advancedpython
    11 replies  •  2014-07-16 12:17:24 +08:00
    Froshal
    Froshal
    Mar 19, 2014
    1
    谢谢分享
    a2z
    a2z
    Mar 19, 2014❤️1
    2
    感谢分享
    raquelken
    raquelken
    Mar 19, 2014
    3
    分享是好事,但是希望能写正确。。。
    cocorosiekz
    cocorosiekz
    Mar 19, 2014❤️1
    4
    python官网有how to系列,其中有函数式编程部分,地址http://docs.python.org/2/howto/functional.html
    hupantingxue
    hupantingxue
    OP
    Mar 19, 2014
    5
    @raquelken 有问题可以直接给我提issue,谢谢!
    ljcarsenal
    ljcarsenal
    Mar 19, 2014 via Android
    6
    马克
    yakczh
    yakczh
    Mar 19, 2014
    7
    问个低阶的问题
    怎么用format格式化tuple的子项
    比如
    tu=('Server', 'Apache/2.2.4 ')

    print(" {0}:{1} ".format(tu))
    想输出 Server : Apache/2.2.4
    但是提示tuple index out of range
    polythene
    polythene
    Mar 19, 2014
    8
    @yakczh try: print(" {0}:{1} ".format(*tu))
    yakczh
    yakczh
    Mar 19, 2014
    9
    @polythene 文档中没看到这种用法,能解释下吗?
    lsj5031
    lsj5031
    Mar 19, 2014
    10
    @yakczh
    unpack the tuple/sequence/collection into positional arguments.
    因为format要跟的参数不是这个tuple,而是你那两个string。
    hupantingxue
    hupantingxue
    OP
    Jul 16, 2014
    11
    更新了一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4913 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 07:16 · PVG 15:16 · LAX 23:16 · JFK 02:16
    ♥ Do have faith in what you're doing.