"embedded NUL character" exceptions
Aug. 17, 2014
2:47 p.m.
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 backward incompatible change. I think that we should get rid of this legacy inconsistency sooner or later. Why not fix it right now? I have opened an issue on the tracker [1], but this issue requires more broad discussion. [1] http://bugs.python.org/issue22215
4142
Age (days ago)
4142
Last active (days ago)
1 comments
2 participants
participants (2)
-
Guido van Rossum -
Serhiy Storchaka