Class SplitLineIterator
source code
object --+
|
common.RowIterator --+
|
common.FileRowIterator --+
|
SplitLineIterator
An object that encapsulates the a source being parsed by a
grammar.
RowIterators are returned by Grammars' parse methods. Iterate over
them to retrieve the rows contained in the source.
You can also call getParameters on them to retrieve document-global
values (e.g., the parameters of a VOTable, a global header of a FITS
table).
The getLocator method should return some string that aids the user in
finding out why something went wrong (file name, line number, etc.)
This default implementation works for when source is a sequence of
dictionaries. You will, in general, want to override _iteRows and
getLocator, plus probably __init__ (to prepare external resources) and
getParameters (if you have them; make sure to update any parameters you
have with self.sourceRow as shown in the default getParameters
implementation).
RowIterators are supposed to be self-destructing, i.e., they should
release any external resources they hold when _iterRows runs out of
items.
_iterRows should arrange for the instance variable recNo to be
incremented by one for each item returned.
|
__init__(self,
grammar,
sourceToken,
**kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
Inherited from common.RowIterator :
__iter__ ,
getParameters
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
__init__(self,
grammar,
sourceToken,
**kwargs)
(Constructor)
| source code
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Overrides:
object.__init__
- (inherited documentation)
|