callback patterns and idioms in Python
callback patterns and idioms in Python
callback patterns and idioms in Python
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Event-driven pars<strong>in</strong>g<br />
e.g. SAX for XML<br />
"events" are start <strong>and</strong> end of tags<br />
h<strong>and</strong>lers are responsible for keep<strong>in</strong>g stack<br />
or other structure as needed<br />
often not necessary to keep all...!<br />
at the other extreme: XML's DOM<br />
somewhere <strong>in</strong>-between: "pull DOM"...<br />
events as "stream" rather than <strong>callback</strong><br />
can "exp<strong>and</strong> node" for DOMy subtrees<br />
19