[Python-Dev] unicode/string asymmetries

Jack Jansen jack@oratrix.nl
Wed, 09 Jan 2002 13:12:56 +0100


> > 3. There does not seem to be an equivalent to the 's' format character
> > for PyArg_Parse() or Py_BuildValue().
> 
> That would be 'u'. However, is this really needed? PyArg_Parse is
> deprecated, 

Huh, what did I miss? Why is PyArg_Parse deprecated, and by what should it be 
replaced?

> and I doubt you have Py_UNICODE* often enough to need
> it to pass to Py_BuildValue.

Martin, have you ever wrapped any Unicode API's? (As opposed to using unicode 
as a purely internal datatype, which you clearly know a lot about). Thomas' 
question are similar to mine from last week, and Neil's are related too. All 
the niceties we have for strings (optional ones with z, autoconversion from 
unicode, s# to get the size) are missing for unicode, and that's a pain when 
you're wrapping an existing C api.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma Goldman -