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/2002-January/019322.html below:

[Python-Dev] unicode/string asymmetries

[Python-Dev] unicode/string asymmetries [Python-Dev] unicode/string asymmetriesMartin v. Loewis martin@v.loewis.de
Wed, 9 Jan 2002 22:24:28 +0100
> How about this: we add a wchar_t codec to Python and the "eu#" parser
> marker. Then you could write:
> 
> 	wchar_t value = NULL;
> 	int len = 0;
> 	if (PyArg_ParseTuple(tuple, "eu#", "wchar_t", &value, &len) < 0)
>                 return NULL;

Wouldn't that code be incorrect if there are further format argument
whose conversion could fail also?

I think format specifiers that require explicit memory management are
so difficult to use that they must be avoided. I'd be in favour of
extending the argtuple type to include additional slots for objects
that go away when the tuple goes away.

Regards,
Martin




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