Serhiy Storchaka added the comment:

The default value of the lower bound index is 0, but the default value of the 
upper bound index is the length of the sequence. s[:a] is the same as s[0:a], 
but s[a:] is the same as s[a:len(s)].

If make s[a:0] meaning the same as s[a:len(s)], i.e. return a subsequence from 
index a to the end, while s[0:a] means the same as s[:a], i.e. returns a 
subsequence from the begin to index a, what should mean s[0:0]? There is a 
contradiction.

This change would break existing code.

----------
nosy: +serhiy.storchaka
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

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

Reply via email to