classification
Title: Missing "continue" example for "for" loop tutorial
Type: behavior Stage: resolved
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Daniel.Ellis, chris.jerdonek, docs@python, orsenthil, python-dev, rhettinger
Priority: normal Keywords: patch

Created on 2012-08-12 15:38 by Daniel.Ellis, last changed 2012-08-12 19:16 by orsenthil. This issue is now closed.

Files
File name Uploaded Description Edit
for_continue_doc.patch Daniel.Ellis, 2012-08-12 16:44 review
Messages (7)
msg168049 - (view) Author: Daniel Ellis (Daniel.Ellis) Date: 2012-08-12 15:38
Found by Jesse Bikman:

On this page, http://docs.python.org/tutorial/controlflow.html there is no example in the code of a "continue" statement (section 4.4). It is explained, but not actually used in code.
msg168054 - (view) Author: Daniel Ellis (Daniel.Ellis) Date: 2012-08-12 16:44
Added basic example for "continue".
msg168055 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2012-08-12 17:03
This looks good.   Please remove the "... " prompt from the example so that the code is cut-and-pasteable by people who want to experiment with the example.
msg168056 - (view) Author: Daniel Ellis (Daniel.Ellis) Date: 2012-08-12 17:08
Oh, I was keeping with the format of the other examples in the tutorial.  Should I remove the prompts from all of them?
msg168057 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-08-12 17:19
> Please remove the "... " prompt from the example so that the code is cut-and-pasteable by people who want to experiment with the example.

That is the usual format for docstring examples.  See, for example--

http://docs.python.org/dev/library/doctest.html#how-are-docstring-examples-recognized
msg168061 - (view) Author: Roundup Robot (python-dev) Date: 2012-08-12 19:15
New changeset a4d5ac78a76b by Senthil Kumaran in branch '2.7':
Issue #15630: Add an example for "continue" statement in the tutorial. Patch by
http://hg.python.org/cpython/rev/a4d5ac78a76b

New changeset e855e6c26dfb by Senthil Kumaran in branch '3.2':
Issue #15630: Add an example for "continue" statement in the tutorial. Patch by
http://hg.python.org/cpython/rev/e855e6c26dfb

New changeset dd41c287cf7c by Senthil Kumaran in branch 'default':
merge from 3.2
http://hg.python.org/cpython/rev/dd41c287cf7c
msg168062 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2012-08-12 19:16
Thanks for the patch, Daniel. Fixed in all versions.
History
Date User Action Args
2012-08-12 19:16:37orsenthilsetstatus: open -> closed

type: behavior

nosy: + orsenthil
messages: + msg168062
resolution: fixed
stage: resolved
2012-08-12 19:15:42python-devsetnosy: + python-dev
messages: + msg168061
2012-08-12 17:19:25chris.jerdoneksetnosy: + chris.jerdonek
messages: + msg168057
2012-08-12 17:08:12Daniel.Ellissetmessages: + msg168056
2012-08-12 17:03:24rhettingersetnosy: + rhettinger
messages: + msg168055
2012-08-12 16:44:25Daniel.Ellissetfiles: + for_continue_doc.patch
keywords: + patch
messages: + msg168054
2012-08-12 15:38:48Daniel.Elliscreate