diff Python/Python-ast.c @ 41766:d6aa7edf217a

Add 'U'/'U#' format characters to Py_BuildValue (and thus to PyObject_CallFunction()) that take a char * (and a size in the case of 'U#') and create a unicode object out of it. Add functions PyUnicode_FromFormat() and PyUnicode_FromFormatV() that work similar to PyString_FromFormat(), but create a unicode object (also a %U format character has been added, that takes a PyObject *, which must point to a unicode object). Change the encoding and reason attributes of UnicodeEncodeError, UnicodeDecodeError and UnicodeTranslateError to be unicode objects.
author Walter Dörwald <walter@livinglogic.de>
date Fri, 18 May 2007 16:29:38 +0000
parents d3cd2920beb6
children 24b60622b944
line wrap: on
line diff