[Patches] Py_BuildValue Unicode support
M.-A. Lemburg
mal@lemburg.com
Sat, 22 Apr 2000 17:04:16 +0200
Guido van Rossum wrote:
>
> > There might be a nicer way to do this, but I wanted to be able to
> > use Py_BuildValue to produce Unicode objects, so I added a few
> > lines to modsupport to do this. Each Unicode object requires
> > two arguments, the raw Py_UNICODE string and the length as an
> > integer. I think since all Python Unicode strings are 0 terminated,
> > it might be nice to make this into "U#" and also allow a plain "U"
> > to mean a (double) null-terminated Unicode string as input; however,
> > I'll leave that up to you all to determine (I would personally like
> > to see this option).
>
> Yes, what you coded here should be called U#.
Perhaps the naming should be "u#" and "u" rather than "U#" and
"U" !? This would be in sync with "s#" and "s" for 8-bit strings.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/