Tornado 6.1 Documentation
tornado.tcpserver — Basic IOStream-based TCP server Coroutines and concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines divided into four major components: A web framework (including RequestHandler which is subclassed to create web applications, and various supporting classes). Client- and server-side implementions of HTTP yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via the yield0 码力 | 931 页 | 708.03 KB | 1 年前3Tornado 6.0 Documentation
tornado.tcpserver — Basic IOStream-based TCP server Coroutines and concurrency tornado.gen — Generator-based coroutines tornado.locks – Synchronization primitives tornado.queues – Queues for coroutines divided into four major components: A web framework (including RequestHandler which is subclassed to create web applications, and various supporting classes). Client- and server-side implementions of HTTP yield is a generator. All generators are asynchronous; when called they return a generator object instead of running to completion. The @gen.coroutine decorator communicates with the generator via the yield0 码力 | 869 页 | 692.83 KB | 1 年前3Python 标准库参考指南 2.7.18
. . . . . . . . . . . . . . . . . . . . . . . . 1122 25 开发工具 1123 25.1 pydoc —Documentation generator and online help system . . . . . . . . . . . . . . . . . . . . . . . 1123 25.2 doctest —测试交互性的 in that it does not use the module administration —it reads the file unconditionally and does not create a new module.1 The arguments are a file name and two optional dictionaries. The file is parsed and deleter attributes were added. range(stop) range(start, stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
. . . . . . . . . . . . . . . . . . . . . . . . 1122 25 开发工具 1123 25.1 pydoc —Documentation generator and online help system . . . . . . . . . . . . . . . . . . . . . . . 1123 25.2 doctest —测试交互性的 in that it does not use the module administration —it reads the file unconditionally and does not create a new module.1 The arguments are a file name and two optional dictionaries. The file is parsed and deleter attributes were added. range(stop) range(start, stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
. . . . . . . . . . . . . . . . . . . . . . . . 1122 25 开发工具 1123 25.1 pydoc —Documentation generator and online help system . . . . . . . . . . . . . . . . . . . . . . . 1123 25.2 doctest —测试交互性的 in that it does not use the module administration —it reads the file unconditionally and does not create a new module.1 The arguments are a file name and two optional dictionaries. The file is parsed and deleter attributes were added. range(stop) range(start, stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 3.6.15
此行为特性的实现将无法正常使用。 34 Chapter 4. 内置类型 The Python Library Reference, 发布 3.6.15 4.5.1 生成器类型 Python 的generator 提供了一种实现迭代器协议的便捷方式。如果容器对象 __iter__() 方法被实现为一 个生成器,它将自动返回一个迭代器对象(从技术上说是一个生成器对象),该对象提供 __iter__() 和 The Python Library Reference, 发布 3.6.15 copy() 返回原字典的浅拷贝。 classmethod fromkeys(seq[, value]) Create a new dictionary with keys from seq and values set to value. fromkeys() 属于类方法,会返回一个新字典。value 默认为 the creation of (value, key) pairs using zip(): pairs = zip(d.values(), d.keys()). Another way to create the same list is pairs = [(v, k) for (k, v) in d.items()]. 在添加或删除字典中的条目期间对视图进行迭代可能引发RuntimeError0 码力 | 1886 页 | 8.95 MB | 9 月前3Python 标准库参考指南 3.6.15
此行为特性的实现将无法正常使用。 34 Chapter 4. 内置类型 The Python Library Reference, 发布 3.6.15 4.5.1 生成器类型 Python 的generator 提供了一种实现迭代器协议的便捷方式。如果容器对象 __iter__() 方法被实现为一 个生成器,它将自动返回一个迭代器对象(从技术上说是一个生成器对象),该对象提供 __iter__() 和 The Python Library Reference, 发布 3.6.15 copy() 返回原字典的浅拷贝。 classmethod fromkeys(seq[, value]) Create a new dictionary with keys from seq and values set to value. fromkeys() 属于类方法,会返回一个新字典。value 默认为 the creation of (value, key) pairs using zip(): pairs = zip(d.values(), d.keys()). Another way to create the same list is pairs = [(v, k) for (k, v) in d.items()]. 在添加或删除字典中的条目期间对视图进行迭代可能引发RuntimeError0 码力 | 1886 页 | 8.95 MB | 9 月前3Python3 基础教程 - 廖雪峰
com/ 112/531 而节省大量的空间。在 Python 中,这种一边循环一边计算的机制,称 为生成器:generator。 要创建一个 generator,有很多种方法。第一种方法很简单,只要把一个 列表生成式的[]改成(),就创建了一个 generator: >>> L = [x * x for x in range(10)] >>> L [0, 1, 4, 9, 16 g <generator objectat 0x1022ef630> 创建 L 和 g 的区别仅在于最外层的[]和(),L 是一个 list,而 g 是一个 generator。 我们可以直接打印出 list 的每一个元素,但我们怎么打印出 generator 的 每一个元素呢? 如果要一个一个打印出来,可以通过 next()函数获得 generator 的下一个 StopIteration 我们讲过,generator 保存的是算法,每次调用 next(g),就计算出 g 的 下一个元素的值,直到计算到最后一个元素,没有更多的元素时,抛出 StopIteration 的错误。 当然,上面这种不断调用 next(g)实在是太变态了,正确的方法是使用 for 循环,因为 generator 也是可迭代对象: >>> g = (x * x 0 码力 | 531 页 | 5.15 MB | 1 年前3Scrapy 2.11 Documentation
next? The next steps for you are to install Scrapy, follow through the tutorial to learn how to create a full-blown Scrapy project and join the community [https://scrapy.org/community/]. Thanks for your Virtual Environments and Packages [https://docs.python.org/3/tutorial/venv.html#tut-venv] on how to create your virtual environment. Once you have created a virtual environment, you can install Scrapy inside a directory where you’d like to store your code and run: scrapy startproject tutorial This will create a tutorial directory with the following contents: tutorial/ scrapy.cfg # deploy configuration0 码力 | 528 页 | 706.01 KB | 1 年前3Scrapy 2.11.1 Documentation
next? The next steps for you are to install Scrapy, follow through the tutorial to learn how to create a full-blown Scrapy project and join the community [https://scrapy.org/community/]. Thanks for your Virtual Environments and Packages [https://docs.python.org/3/tutorial/venv.html#tut-venv] on how to create your virtual environment. Once you have created a virtual environment, you can install Scrapy inside a directory where you’d like to store your code and run: scrapy startproject tutorial This will create a tutorial directory with the following contents: tutorial/ scrapy.cfg # deploy configuration0 码力 | 528 页 | 706.01 KB | 1 年前3
共 532 条
- 1
- 2
- 3
- 4
- 5
- 6
- 54