[Python-Dev] [Python-checkins] cpython: Fix PyUnicode_Substring() for start >= length and start (original) (raw)

Victor Stinner victor.stinner at gmail.com
Thu May 3 03:38:33 CEST 2012


+    if (start >= length || end < start) { +        assert(end == length); +        return PyUnicodeNew(0, 0); +    } That assert doesn't look right.

Oh, you're right. I added it for the first case: start>=length. But the assertion is really useless, I removed it. Thanks!

Victor



More information about the Python-Dev mailing list