[issue8848] Remove U and U# formats of Py_BuildValue()

2010-05-28 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@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 rep...@bugs.python.org
http://bugs.python.org/issue8848
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8848] Remove U and U# formats of Py_BuildValue()

2010-05-28 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Less extreme patch: set 'U' as an alias to 's' (and 'U#' as an alias to 's#'). 
Replace usage of 'U' by 's'.

Note: 'z' is also an alias to 's', and 'z#' an alias to 's#'.

--
keywords: +patch
Added file: http://bugs.python.org/file17491/py_buildvalue_removeU.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8848
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com