sasoptpy.abstract.SetIterator

class SetIterator(initset, name=None, datatype=None)[source]

Bases: sasoptpy.core.expression.Expression

Creates an iterator object for a given Set

Parameters
initsetSet

Set to be iterated on

namestring, optional

Name of the iterator

datatypestring, optional

Type of the iterator

Notes

  • abstract.SetIterator objects are created automatically when iterating over a abstract.Set object

Examples

>>> S = so.Set(name='S')
>>> for i in S:
...     print(i.get_name(), type(i))
o19 <class 'sasoptpy.abstract.set_iterator.SetIterator'>