Home | Trees | Indices | Help |
---|
|
Abstract base class for all iterator factories. Given a collection of objects in some form, instances of this class should be able to produce (as a factory) fresh iterators over the collection.
Of particular importance is that multiple iterator instances should be able to exist simultaneously and at different positions to enable nested looping over the same collection.
It effectively encapsulates a streaming data source (such as a file) as if it were an in-memory list that you could keep retrieving fresh iterators off of.
|
|||
|
|
Primary abstract method where, that returns an iterator useable in a "for item in iterator:" construct. Based on the "iterable" interface, so no explicit function call is needed. If you want to though, you could do something like factory = FileFactory(filename); for item in iter(factory): print item; or just for item in factory: print item; |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Thu Nov 8 17:49:28 2007 | http://epydoc.sourceforge.net |