I cannot find that the documentation states "with negative step swap
left with right".  This is perhaps non-obvious.  It is the words of the
tutorial that caused issue 5029 author's confusion.  'a'[0::-1] != []
(is True, author expected False).
The tutorial says:

"One way to remember how slices work is to think of the indices as
pointing between characters, with the left edge of the first character
numbered 0. Then the right edge of the last character of a string of n
characters has index n, for example:"
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to