Skip to main content

%SYS.Python.StreamIterator

class %SYS.Python.StreamIterator extends %Library.RegisteredObject

Implementation of a COS Stream Iterator for Python

Property Inventory

Method Inventory

Properties

property %Stream as %Stream.Object [ Transient ];
Stream that we are iterating on
Property methods: %StreamDelete(), %StreamGet(), %StreamGetObject(), %StreamGetObjectId(), %StreamGetSwizzled(), %StreamIsValid(), %StreamNewObject(), %StreamOid(), %StreamOpen(), %StreamSet(), %StreamSetObject(), %StreamSetObjectId(), %StreamUnSwizzle()

Methods

method %OnNew(stream As %Stream.Object, mode As %String = "") as %Status
Initialize this iterator helper
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
method __len__() as %Integer
Return the length of the iterable collection (if known)
method __next__() as %String
Python iterator implementation. The spec states that an iterator should return lines.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab