[New-bugs-announce] [issue8848] Remove "U" and "U#" formats of Py_BuildValue()

STINNER Victor report at bugs.python.org
Sat May 29 03:38:48 CEST 2010


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

"U" and "U#" formats were introduced by r55433 (Python3). At this same, "s" and "U" formats were different: "s" called PyString_FromStringAndSize() and "U" called PyUnicode_FromStringAndSize(). Two months later, PyString_FromStringAndSize() was replaced by PyUnicode_FromStringAndSize() for format "s", and so both formats are exactly the same.

"U" and "U#" were introduced during the transition between bytes, str and unicode. They can now be replaced by "s" and "s#", and then be removed.

There is just one usage of "U": definition of sys.subversion (Python/sysmodule.c), whereas there are 36 usages of "s" format. (U# and s# are not used.)

----------
components: Interpreter Core
messages: 106700
nosy: doerwalter, haypo
priority: normal
severity: normal
status: open
title: Remove "U" and "U#" formats of Py_BuildValue()
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8848>
_______________________________________


More information about the New-bugs-announce mailing list