[issue8377] Errata on page:http://docs.python.org/library/stdtypes.html

Walter Dörwald report at bugs.python.org
Mon Apr 12 11:17:07 CEST 2010


Walter Dörwald <walter at livinglogic.de> added the comment:

This is a common thinko. ;)

If i is negative then len(s) - i would be greater that len(s). However len(s) + i  is correct. Example:

foo[-1] is foo[len(foo) + (-1)] is foo[len(foo)-1]

----------
nosy: +doerwalter
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8377>
_______________________________________


More information about the Python-bugs-list mailing list