[issue5666] Py_BuildValue("c") should return bytes?

STINNER Victor report at bugs.python.org
Thu Apr 2 13:17:44 CEST 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Let's try grep on py3k:
 grep 'Py_BuildValue("[^"]*c' $(find -name "*.c")

Py_BuildValue("c") is used for:
 - mmap.read_byte() result
 - <curses window>.getkey() result: this method returns also unicode 
string => your patch breaks getkey()!
 - array.__reduce__(): i don't understand if the patch breaks anything

I think that curses and array should use "C" format, but... it doesn't 
exist for Py_BuildValue. It was maybe forgotten.

----------

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


More information about the Python-bugs-list mailing list