[XML-SIG] PyExpat changes
A.M. Kuchling
akuchlin@mems-exchange.org
Thu, 15 Jun 2000 22:27:52 -0400
I've just checked in the changes to make the Expat module return
Unicode or 8-bit strings, depending on the setting of the
returns_unicode attribute. Adding this proved to be messy; if anyone
can suggest a neater way to do this, please let me know. Basically,
the relevant calls to Py_BuildValue("s") become calls with "O&",
returns_unicode ? <function that makes a Unicode string> : <function
that makes an 8-bit string>. Worse, creating the dictionary
containing attributes requires two very similar parallel functions for
each case.
Also, I'm starting to find the capitalized method and attribute names
.Parse, .StartElementHandler) annoying; the methods are more annoying
than the attribute names. Think this is worth fixing?
--
A.M. Kuchling http://starship.python.net/crew/amk/
That's the world as Sutekh would leave it: a desolate planet circling a dead
sun.
-- The Doctor, in "The Pyramids of Mars"