[Python-Dev] xml.parsers.expat no userdata in callback functions

"Martin v. Löwis" martin at v.loewis.de
Sat Aug 13 13:50:06 CEST 2005

Kristian Benoit wrote:
> This means one cant parse multiple files at the same time using the same
> handlers. You cant pass the context current context to the handler, you must
> base your code on global variables which is not so nice.

This is not true. You can create multiple parsers, and then can make the
callback functions bound methods, using self to store parse-specific
data. There is no need to have extra callback data.


More information about the Python-Dev mailing list