[Python-3000] passing bytes buffers to C with NUL characters in them?

Guido van Rossum guido at python.org
Sat Oct 27 02:42:42 CEST 2007


2007/10/26, Bill Janssen <janssen at parc.com>:
> I'm not sure what to use in PyArg_ParseTuple in 3K.  I'm passing in
> bytes which may contain NUL characters.  Using 's#' doesn't really
> work, because it erroneously accepts Unicode strings.

Use y# I think.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list