Issue 18403: Minor bug in The Python Tutorial (original) (raw)

Issue18403

Created on 2013-07-08 10:36 by xfq, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg192632 - (view) Author: Fuqiao Xue (xfq) Date: 2013-07-08 10:36
In http://docs.python.org/3.3/tutorial/introduction.html#strings: In addition to indexing, slicing is also supported. While indexing is used to obtain individual characters, slicing allows you to obtain substring: >>> word[0:2] # characters from position 0 (included) to 2 (excluded) 'Py' >>> word[2:5] # characters from position 2 (included) to 4 (excluded) 'tho' I think the second comment should be "from position 2 to 5", not "to 4". I'm a Python newbie, sorry if it's not a bug.
msg192644 - (view) Author: Madison May (madison.may) * Date: 2013-07-08 12:26
Nope, definitely an error! Good catch, Xue.
msg192663 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-08 15:53
New changeset 6f16fa5223cc by Ezio Melotti in branch '3.3': #18403: fix an off-by-one typo noticed by Xue Fuqiao. http://hg.python.org/cpython/rev/6f16fa5223cc New changeset d41adb657bd4 by Ezio Melotti in branch 'default': #18403: merge with 3.3. http://hg.python.org/cpython/rev/d41adb657bd4
msg192664 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-07-08 15:54
Fixed, thanks for the report!
History
Date User Action Args
2022-04-11 14:57:47 admin set github: 62603
2013-07-08 15:54:37 ezio.melotti set status: open -> closedtype: enhancementassignee: docs@python -> ezio.melottiversions: + Python 3.4nosy: + ezio.melottimessages: + resolution: fixedstage: resolved
2013-07-08 15:53:44 python-dev set nosy: + python-devmessages: +
2013-07-08 12:26:40 madison.may set nosy: + madison.maymessages: +
2013-07-08 10:36:52 xfq create