Macaulay2 » Documentation
Packages » Python :: iterator(PythonObject)
next | previous | forward | backward | up | index | toc

iterator(PythonObject) -- get iterator of iterable python object

Synopsis

Description

This function works just like its Python counterpart. In particular, i is an iterator for the iterable object x.

i1 : x = pythonValue "range(3)"

o1 = range(0, 3)

o1 : PythonObject of class range
i2 : i = iterator x

o2 = <range_iterator object at 0x7c8ffef39f80>

o2 : PythonObject of class range_iterator

See also

Ways to use this method: