[docs] Bad example in Chapter 3 of Python 2.6.5 Tutorial

Dylan Laufenberg electroboy455 at gmail.com
Thu Jun 10 07:30:41 CEST 2010


Hi there.

This should be easy to fix, and I may be wrong (I'm just learning Python),
but I believe the behavior of negative list (in this case, string) indices
is such that a[-1] returns the *last* element, not the second-last. However,
near the bottom of the Strings section of Chapter 3 of the official tutorial
(link <http://docs.python.org/tutorial/introduction.html#strings>) is a
section and table regarding this, conflicts with itself: the ASCII table
near the very bottom lists the indices wrong!

Thank you for your help, and I do apologize if I am mistaken, but I'm fairly
sure I'm right. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20100610/1f019c0d/attachment-0001.html>


More information about the docs mailing list