[Python-checkins] cpython: Optimize string slicing to use the new API
Antoine Pitrou
solipsis at pitrou.net
Tue Oct 4 19:50:30 CEST 2011
On Tue, 04 Oct 2011 19:49:09 +0200
"Martin v. Löwis" <martin at v.loewis.de> wrote:
> > + result = PyUnicode_New(slicelength, PyUnicode_MAX_CHAR_VALUE(self));
>
> This is incorrect: the maxchar of the slice might be smaller than the
> maxchar of the input string.
I thought that heuristic would be good enough. I'll try to fix it.
Regards
Antoine.
More information about the Python-checkins
mailing list