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 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 more appropriate he

[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 b