This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Minor bug in The Python Tutorial
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, ezio.melotti, madison.may, python-dev, xfq
Priority: normal Keywords:

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 addition to indexing, slicing is also supported. While indexing is
  used to obtain individual characters, slicing allows you to obtain
  >>> word[0:2]  # characters from position 0 (included) to 2 (excluded)
  >>> word[2:5]  # characters from position 2 (included) to 4 (excluded)

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.

New changeset d41adb657bd4 by Ezio Melotti in branch 'default':
#18403: merge with 3.3.
msg192664 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-07-08 15:54
Fixed, thanks for the report!
Date User Action Args
2022-04-11 14:57:47adminsetgithub: 62603
2013-07-08 15:54:37ezio.melottisetstatus: open -> closed

type: enhancement
assignee: docs@python -> ezio.melotti
versions: + Python 3.4
nosy: + ezio.melotti

messages: + msg192664
resolution: fixed
stage: resolved
2013-07-08 15:53:44python-devsetnosy: + python-dev
messages: + msg192663
2013-07-08 12:26:40madison.maysetnosy: + madison.may
messages: + msg192644
2013-07-08 10:36:52xfqcreate