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

2005-08-13 Thread Guido van Rossum
> 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. > "Martin v. Löwis" replied: > This is not true. You c

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

2005-08-13 Thread Martin v. Löwis
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 ca

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

2005-08-12 Thread Kristian Benoit
In the C version of expat, handlers receive a void *userdata, but it is not the case in the python version. 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