[Python-Dev] embedded NUL character exceptions

2014-08-17 Thread Serhiy Storchaka
Currently most functions which accepts string argument which then passed to C function as NUL-terminated string, reject strings with embedded NUL character and raise TypeError. ValueError looks more appropriate here, because argument type is correct (str), only its value is wrong. But this is

Re: [Python-Dev] embedded NUL character exceptions

2014-08-17 Thread Guido van Rossum
Sounds good to me. On Sun, Aug 17, 2014 at 7:47 AM, Serhiy Storchaka storch...@gmail.com wrote: Currently most functions which accepts string argument which then passed to C function as NUL-terminated string, reject strings with embedded NUL character and raise TypeError. ValueError looks