V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
codists
V2EX  ›  Python

翻译:《实用的 Python 编程》06_00_Overview

  •  1
     
  •   codists ·
    codists · 2021-03-14 21:14:01 +08:00 · 1193 次点击
    这是一个创建于 1132 天前的主题,其中的信息可能已经有所发展或是发生改变。

    6. 生成器

    在 Python 语言中,迭代(for 循环)是最常用的编程模式之一。程序执行大量的迭代来处理列表、读取文件、查询数据库......Python 最强大的特性之一就是能够以所谓的“生成器函数( generator function )”形式自定义和重新定义迭代。本节将对生成器主题进行介绍。最后,你将学习以一种有趣的方式编写程序来处理实时流数据。

    注:完整翻译见 https://github.com/codists/practical-python-zh

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2883 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:53 · PVG 11:53 · LAX 20:53 · JFK 23:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.