Package gavo :: Package base :: Module common :: Class Parser
[frames] | no frames]

Class Parser

source code

object --+
         |
        Parser
Known Subclasses:

is an object that routes events.

It is constructed with up to three functions for handling start, value, and end events; these would override methods start_, end_, or value_. Thus, you can simply implement when inheriting from Parser. In that case, no call the the constructor is necessary (i.e., Parser works as a mixin as well).

Instance Methods
 
__init__(self, start=None, value=None, end=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__providedBy__(...)
Object Specification Descriptor
source code
 
__provides__(...)
Special descriptor for class __provides__
 
feedEvent(self, ctx, type, name, value) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __implemented__ = <implementedBy gavo.base.common.Parser>
Properties

Inherited from object: __class__

Method Details

__init__(self, start=None, value=None, end=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__provides__(...)

 

Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that we can get declarations for objects without instance-specific interfaces a bit quicker.