__init__ ( self )
This Consumer is inherits from many other consumer classes that handle
the actual dirty work. An alternate way to do it is to create objects
of those classes and then delegate the parsing tasks to them in a
decorator-type pattern. The disadvantage of that is that the method
names will need to be resolved in this classes. However, using
a decorator will retain more control in this class (which may or
may not be a bad thing). In addition, having each sub-consumer as
its own object prevents this object's dictionary from being cluttered
with members and reduces the chance of member collisions.
|