The concept of an iterator range is fundamental to the standard library.
迭代器范围这个概念是标准库的基础。
Functions like xrange are a bit "special" in being generator-like, but neither quite a real iterator (no.next method), nor a realized list like range returns.
xrange这样的函数与生成器类似的方面有些“特殊”,它们既不是真正的迭代器(没有.next方法),也不是实际的列表(比如range返回的列表)。
Returns the range size of the iterator.
获得迭代器的范围大小。
Such unique features include iterator blocks, parallel assignment, and oddities like the Range class.
这些独特的特性包括iterator块、并行赋值和像range类这样奇妙的东西。
When using iterators, it is usually possible to write the program so that the range of code over which an iterator must stay valid is relatively short.
使用迭代器时,通常可以编写程序使得要求迭代器有效的代码范围相对较短。
When using iterators, it is usually possible to write the program so that the range of code over which an iterator must stay valid is relatively short.
使用迭代器时,通常可以编写程序使得要求迭代器有效的代码范围相对较短。
应用推荐