%SYS.Python.StreamIterator
Class %SYS.Python.StreamIterator Extends %RegisteredObject [ System = 4 ]
Implementation of a COS Stream Iterator for Python
Properties
%Stream
Property %Stream As %Stream.Object [ Transient ];
Stream that we are iterating on
Methods
%OnNew
Method %OnNew(stream As %Stream.Object, mode As %String = "") As %Status
Initialize this iterator helper
"next"
Method "__next__"() As %String
Python iterator implementation. The spec states that an iterator should return lines.
"iter"
Method "__iter__"() As %SYS.Python.StreamIterator
Allows an "iterator on an iterator", note that it does NOT reset then "index" it just continues on and this does not "clone", it's a reference as per Python behavior
"len"
Method "__len__"() As %Integer
Return the length of the iterable collection (if known)