[Python-Dev] Unicode support in getargs.c

Martin v. Loewis martin@v.loewis.de
Sun, 6 Jan 2002 20:48:41 +0100


> In my last message on this thread, I proposed to add "eu#" which
> returns a Py_UNICODE buffer, possibly decoding a string object
> using the given encoding first. As Martin noted, this option
> requires extra copying but simplifies the C coding somewhat.

Also, while it simplifies processing compared to "O", I cannot see any
simplification compared to "O&". So I'd be more in favor of offering
standard conversion functions for O& instead of inventing new getargs
modifiers all the time. This would also simplify creation of
cross-version extension modules: people could just incorporate the
code of the conversion function into their code base, trusting that O&
had been available for ages.

Regards,
Martin