next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Python :: iterableToList

iterableToList -- convert an iterable python object to a Macaulay2 list

Synopsis

Description

A list is constructed containing each element of the iterable. The elements are converted to Macaulay2 objects (if possible) using value.

i1 : x = rs "range(3)"

o1 = range(0, 3)

o1 : PythonObject of class range
i2 : iterableToList x

o2 = {0, 1, 2}

o2 : List
i3 : class \ oo

o3 = {ZZ, ZZ, ZZ}

o3 : List

See also

Ways to use iterableToList :

For the programmer

The object iterableToList is a method function.