[issue17287] slice inconsistency

2013-02-24 Thread R. David Murray
R. David Murray added the comment: Thanks for the report, but this is working as designed, and is a fundamental part of the design of slices. That said, I have no idea what you are referring to by saying it is inconsistent, and what is "upper" and "lower" referring to? -- nosy: +r.dav

[issue17287] slice inconsistency

2013-02-24 Thread Elazar Gershuni
New submission from Elazar Gershuni: slice behavior is not consistent for negative lower or upper arguments, which could be surprising: >>> 'hello'[:-2] 'hel' >>> 'hello'[:-1] 'hell' >>> 'hello'[:-0] '' this is obvious when written as literal, but not so obvious when using variables in expres