[Patches] Py_BuildValue Unicode support

Brian Hooper brian@garage.co.jp
Sat, 22 Apr 2000 22:31:23 GMT


I just did "U" because I seem to remember seeing big "U" in
PyArg_ParseTuple.

Do you like the idea of having a version that can be used without
length as long as the input Unicode data is null-terminated?  From
the playing around that I have been doing up to this point, I think
this would be convenient to have.

--Brian

>From: "M.-A. Lemburg" <mal@lemburg.com>
>To: Guido van Rossum <guido@python.org>
>CC: brian@garage.co.jp, patches@python.org
>Subject: Re: [Patches] Py_BuildValue Unicode support
>Date: 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/
>
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com