next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Python :: iterator(PythonObject)

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 0x7f6e3caf5920>

o2 : PythonObject of class range_iterator

See also

Ways to use this method: