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
8e67ef52
Kaydet (Commit)
8e67ef52
authored
Mar 03, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Expand a bit on genexp scopes.
üst
d2f7680b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
expressions.rst
Doc/reference/expressions.rst
+8
-7
No files found.
Doc/reference/expressions.rst
Dosyayı görüntüle @
8e67ef52
...
...
@@ -230,14 +230,15 @@ generator are those that would be produced by considering each of the
evaluating the expression to yield a value that is reached the innermost block
for each iteration.
Variables used in the generator expression are evaluated lazily when the
:meth:`next` method is called for generator object (in the same fashion as
normal generators). However, the leftmost :keyword:`for` clause is immediately
evaluated so that error produced by it can be seen before any other possible
Variables used in the generator expression are evaluated lazily in a separate
scope when the :meth:`next` method is called for the generator object (in the
same fashion as for normal generators). However, the :keyword:`in` expression
of the leftmost :keyword:`for` clause is immediately evaluated in the current
scope so that an error produced by it can be seen before any other possible
error in the code that handles the generator expression. Subsequent
:keyword:`for`
clauses cannot be evaluated immediately since they may depend on
the
previous :keyword:`for` loop. For example: ``(x*y for x in range(10) for y
in bar(x))``.
:keyword:`for`
and :keyword:`if` clauses cannot be evaluated immediately since
the
y may depend on the previous :keyword:`for` loop. For example:
``(x*y for x in range(10) for y
in bar(x))``.
The parentheses can be omitted on calls with only one argument. See section
:ref:`calls` for the detail.
...
...
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