[docs] [issue21785] __getitem__ and __setitem__ try to be smart when invoked with negative slice indices

Raymond Hettinger report at bugs.python.org
Tue Jun 17 07:38:49 CEST 2014

Raymond Hettinger added the comment:

It's too late for a behavior change in 2.7.   That risks breaking code that relies on the current behavior.

However, the docs could be amended to indicate that slices with negative indicies are treated differently from scalar negative indicies, the former get length adjusted automatically and the latter don't.

assignee:  -> docs at python
components: +Documentation -Interpreter Core
nosy: +docs at python, rhettinger
priority: normal -> low

Python tracker <report at bugs.python.org>

More information about the docs mailing list