[issue15630] Missing "continue" example for "for" loop tutorial
New submission from Daniel Ellis: 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. ---------- assignee: docs@python components: Documentation messages: 168049 nosy: Daniel.Ellis, docs@python priority: normal severity: normal status: open title: Missing "continue" example for "for" loop tutorial _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Daniel Ellis added the comment: Added basic example for "continue". ---------- keywords: +patch Added file: http://bugs.python.org/file26775/for_continue_doc.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Raymond Hettinger added the comment: 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. ---------- nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Daniel Ellis added the comment: Oh, I was keeping with the format of the other examples in the tutorial. Should I remove the prompts from all of them? ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Chris Jerdonek added the comment:
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-r... ---------- nosy: +cjerdonek _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Roundup Robot added the comment: 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 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
Senthil Kumaran added the comment: Thanks for the patch, Daniel. Fixed in all versions. ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15630> _______________________________________
participants (5)
-
Chris Jerdonek
-
Daniel Ellis
-
Raymond Hettinger
-
Roundup Robot
-
Senthil Kumaran