A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-March/002752.html below:

[Python-Dev] Unicode and Windows

[Python-Dev] Unicode and WindowsGreg Stein gstein@lyra.org
Fri, 24 Mar 2000 02:54:02 -0800 (PST)
On Fri, 24 Mar 2000, M.-A. Lemburg wrote:
>...
>   "s":  For Unicode objects: auto convert them to the <default encoding>
>         and return a pointer to the object's <defencstr> buffer.

Guess that I didn't notice this before, but it seems wierd that "s" and
"s#" return different encodings.

Why?

>   "es": 
> 	Takes two parameters: encoding (const char **) and
> 	buffer (char **). 
>...
>   "es#":
> 	Takes three parameters: encoding (const char **),
> 	buffer (char **) and buffer_len (int *).

I see no reason to make the encoding (const char **) rather than
(const char *). We are never returning a value, so this just makes it
harder to pass the encoding into ParseTuple.

There is precedent for passing in single-ref pointers. For example:

  PyArg_ParseTuple(args, "O!", &s, PyString_Type)


I would recommend using just one pointer level for the encoding.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4