Listing 6. The range and xrange methods.
清单6.range和xrange方法。
For example, you can set the xrange also: plot [-pi: PI] sin (x).
例如,还可以设置xrange:plot [-pi:pi]sin (x)。
This same concern got xrange() and xreadlines() added to Python in earlier versions.
同样是这个问题,使得 Python较早的版本中添加了xrange()和xreadlines() 。
As always, [" 31-may-04 ":" 11-jun-04 "] sets up the xrange explicitly, but is not strictly necessary.
象往常一样,[“ 31 - May -04 ”: “ 11 - Jun - 04 ”]显式设置了xrange,但不是完全必要的。
Setting the y-range is similar (use yrange instead of xrange in the command), but I don't talk about it.
设置y 范围与 x 范围相似(在命令中使用yrange,而不是xrange ),但我将不再讨论。
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返回的列表)。
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返回的列表)。
应用推荐