推荐学习书目
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
holajamc
V2EX  ›  Python

求教一个 gevent 相关问题

  •  1
     
  •   holajamc · Nov 24, 2016 · 2351 views
    This topic created in 3476 days ago, the information mentioned may be changed or developed.

    在使用 gevent 时候真的很佩服它的强大,但是在使用中有一个问题一直比较头疼,如图:

    不知道有没有什么更好的写法~

    7 replies    2016-11-29 10:05:11 +08:00
    mgna17
        1
    mgna17  
       Nov 24, 2016   ❤️ 1
    比如。。。用列表生成式么
    [gevent.spawn(item) for item in tmp]
    NaVient
        2
    NaVient  
       Nov 24, 2016   ❤️ 1
    楼主应该才开始写 python
    ```python
    gevet.joinall([gevent.spawn(tmp[i]) for i in range(5)])
    ```
    hastelloy
        3
    hastelloy  
       Nov 24, 2016 via Android   ❤️ 1
    我不厚道的觉得楼主不但刚学 python ,而且是刚学编程,怎么的也可以是 for i.. : temp[i]吧
    est
        4
    est  
       Nov 24, 2016   ❤️ 1
    gevent.pool
    holajamc
        5
    holajamc  
    OP
       Nov 25, 2016
    @mgna17
    @NaVient
    @hastelloy
    @est
    谢谢各位回复,刚刚学习 Python 不久~
    R4rvZ6agNVWr56V0
        6
    R4rvZ6agNVWr56V0  
       Nov 25, 2016   ❤️ 1
    holajamc
        7
    holajamc  
    OP
       Nov 29, 2016
    @GeekGao 谢谢指点~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1269 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 17:23 · PVG 01:23 · LAX 10:23 · JFK 13:23
    ♥ Do have faith in what you're doing.