Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2f76f73d
Kaydet (Commit)
2f76f73d
authored
Agu 12, 2012
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15630: Add an example for "continue" statement in the tutorial. Patch by
Daniel Ellis.
üst
614e44a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
controlflow.rst
Doc/tutorial/controlflow.rst
+16
-3
NEWS
Misc/NEWS
+3
-0
No files found.
Doc/tutorial/controlflow.rst
Dosyayı görüntüle @
2f76f73d
...
@@ -129,9 +129,6 @@ function, see :ref:`tut-loopidioms`.
...
@@ -129,9 +129,6 @@ function, see :ref:`tut-loopidioms`.
The :keyword:`break` statement, like in C, breaks out of the smallest enclosing
The :keyword:`break` statement, like in C, breaks out of the smallest enclosing
:keyword:`for` or :keyword:`while` loop.
:keyword:`for` or :keyword:`while` loop.
The :keyword:`continue` statement, also borrowed from C, continues with the next
iteration of the loop.
Loop statements may have an ``else`` clause; it is executed when the loop
Loop statements may have an ``else`` clause; it is executed when the loop
terminates through exhaustion of the list (with :keyword:`for`) or when the
terminates through exhaustion of the list (with :keyword:`for`) or when the
condition becomes false (with :keyword:`while`), but not when the loop is
condition becomes false (with :keyword:`while`), but not when the loop is
...
@@ -166,6 +163,22 @@ when no exception occurs, and a loop's ``else`` clause runs when no ``break``
...
@@ -166,6 +163,22 @@ when no exception occurs, and a loop's ``else`` clause runs when no ``break``
occurs. For more on the :keyword:`try` statement and exceptions, see
occurs. For more on the :keyword:`try` statement and exceptions, see
:ref:`tut-handling`.
:ref:`tut-handling`.
The :keyword:`continue` statement, also borrowed from C, continues with the next
iteration of the loop::
>>> for num in range(2, 10):
... if x % 2 == 0:
... print("Found an even number", num)
... continue
... print("Found a number", num)
Found an even number 2
Found a number 3
Found an even number 4
Found a number 5
Found an even number 6
Found a number 7
Found an even number 8
Found a number 9
.. _tut-pass:
.. _tut-pass:
...
...
Misc/NEWS
Dosyayı görüntüle @
2f76f73d
...
@@ -350,6 +350,9 @@ Build
...
@@ -350,6 +350,9 @@ Build
Documentation
Documentation
-------------
-------------
- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
Daniel Ellis.
- Issue #13557: Clarify effect of giving two different namespaces to exec or
- Issue #13557: Clarify effect of giving two different namespaces to exec or
execfile().
execfile().
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment