Antoine Pitrou <pit...@free.fr> added the comment:

> Antoine Pitrou wrote:
> > 
> > Antoine Pitrou <pit...@free.fr> added the comment:
> > 
> >>> I am not sure PyUnicode_Decode() should treat NULL as an empty string.
> >>
> >> Definitely not. That would hide programming errors.
> > 
> > Well, this could break some third-party code.
> 
> If that code passes NULL in as buffer s, that 3rd party code is
> already broken and the patch would hide this fact.

Why broken? Passing NULL as a pointer and 0 as the length doesn't sound
"broken".
Other APIs such as PyString_FromStringAndSize() allow exactly this
convention.

----------
title: Some "trivial" python 2.x pickles fails to load in       Python 3.2 -> 
Some "trivial" python 2.x pickles fails to load in Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11286>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to