[Biopython-dev] Finally! Subclass of Dispatch working
Cayte
katel at worldpath.net
Mon May 13 17:34:05 EDT 2002
A subclass of Dispatch works now! Jeff suggested double inheritance from
EventGenerator and Dispatch.
EventGenerator has the glue to the Martel tags. Dispatch has a better
callback mechanism that allows calls to nested tags.
goose = Group( "goose", Str( "goose" ) )
gaggle = Group( "gaggle", RepN( goose ) )
With Dispatch you can call back on both goose and gaggle without conflict.
I thought multiple inheritance would be a mess but it turns out all I have
to add is one member variable,
interest_tags to the Dispatch subclass. I suggest adding it to Dispatch
itself tp prevent confusion.
Hopefully I can submit some parsers that were on hold after I check the
output.
Cayte
More information about the Biopython-dev
mailing list