[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___

[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset a82498f424fe by Serhiy Storchaka in branch '3.5': Issue #24284: The startswith and endswith methods of the str class no longer https://hg.python.org/cpython/rev/a82498f424fe New changeset 04162e06323f by Serhiy Storchaka in branch 'default': Issue

[issue24284] Inconsistency in startswith/endswith

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin. -- assignee: - serhiy.storchaka versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please help me with wording? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___ ___

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread R. David Murray
R. David Murray added the comment: Just in the what's new porting section, I think. The fact that there should be very little to no code that relies on this is why I'd like to see it fixed. The fact that the report was a theoretical one, and not one that broke code, is why I think we should

[issue24284] Inconsistency in startswith/endswith

2015-05-26 Thread Martin Panter
Martin Panter added the comment: How about this for What’s New: * The :meth:`str.startswith` and :meth:`str.endswith` methods no longer return ``True`` when finding the empty string and the indexes are completely out of range. See :issue:`24284`. Perhaps that is good enough, but if you

[issue24284] Inconsistency in startswith/endswith

2015-05-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The behavior of startswith in corner case is inconsistent between str and bytes in Python 3, str and unicode in Python 2, and between str in Python 2 and Python 3. Python 3: ''.startswith('', 1, 0) True b''.startswith(b'', 1, 0) False Python 2:

[issue24284] Inconsistency in startswith/endswith

2015-05-25 Thread R. David Murray
R. David Murray added the comment: I think this can only be applied in a feature release (and I think it should be, because of the backward-compatibility-with-python2 issue). However, since this is potentially controversial, we need some more opinions. -- nosy: +r.david.murray

[issue24284] Inconsistency in startswith/endswith

2015-05-25 Thread Martin Panter
Martin Panter added the comment: I can’t imagine much code would rely on either old or new behaviour. If you only put it into a feature release, would you have to document it as a change in behaviour? -- nosy: +vadmium ___ Python tracker

[issue24284] Inconsistency in startswith/endswith

2015-05-25 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24284 ___ ___