[issue8949] PyArg_Parse*(): "z" should not accept bytes

Marc-Andre Lemburg report at bugs.python.org
Wed Jun 9 13:06:53 CEST 2010


Marc-Andre Lemburg <mal at egenix.com> added the comment:

"z" should not accept bytes... why not ?

"z" is the same as "s" with the addition that passing None
as parameter will result in the pointer to get set to NULL.

"s" accepts bytes via the buffer interface, so why should
"z" behave differently ?

If a function should only accept Unicode or None, then "Z"
should be used instead.

----------

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


More information about the Python-bugs-list mailing list