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
7ae90dd2
Kaydet (Commit)
7ae90dd2
authored
Haz 08, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Elaborate encoding recommendations, and fix ambiguous wording for list comprehensions.
üst
1b8b7183
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
controlflow.rst
Doc/tutorial/controlflow.rst
+6
-1
datastructures.rst
Doc/tutorial/datastructures.rst
+7
-8
No files found.
Doc/tutorial/controlflow.rst
Dosyayı görüntüle @
7ae90dd2
...
@@ -675,7 +675,12 @@ extracted for you:
...
@@ -675,7 +675,12 @@ extracted for you:
(see :ref:`tut-firstclasses` for more on classes and methods).
(see :ref:`tut-firstclasses` for more on classes and methods).
* Don't use fancy encodings if your code is meant to be used in international
* Don't use fancy encodings if your code is meant to be used in international
environments. Plain ASCII works best in any case.
environments. Python's default, UTF-8, or even plain ASCII work best in any
case.
* Likewise, don't use non-ASCII characters in identifiers if there is only the
slightest chance people speaking a different language will read or maintain
the code.
.. rubric:: Footnotes
.. rubric:: Footnotes
...
...
Doc/tutorial/datastructures.rst
Dosyayı görüntüle @
7ae90dd2
...
@@ -162,12 +162,11 @@ Common applications are to make lists where each element is the result of
...
@@ -162,12 +162,11 @@ Common applications are to make lists where each element is the result of
some operations applied to each member of the sequence, or to create a
some operations applied to each member of the sequence, or to create a
subsequence of those elements that satisfy a certain condition.
subsequence of those elements that satisfy a certain condition.
A list comprehension consists of brackets containing an expression followed
Each list comprehension consists of an expression followed by a :keyword:`for`
by a :keyword:`for` clause, then zero or more :keyword:`for` or :keyword:`if`
clause, then zero or more :keyword:`for` or :keyword:`if` clauses. The result
clauses. The result will be a list resulting from evaluating the expression in
will be a list resulting from evaluating the expression in the context of the
the context of the :keyword:`for` and :keyword:`if` clauses which follow it. If
:keyword:`for` and :keyword:`if` clauses which follow it. If the expression
the expression would evaluate to a tuple, it must be parenthesized.
would evaluate to a tuple, it must be parenthesized.
Here we take a list of numbers and return a list of three times each number::
Here we take a list of numbers and return a list of three times each number::
...
@@ -348,8 +347,8 @@ The reverse operation is also possible::
...
@@ -348,8 +347,8 @@ The reverse operation is also possible::
>>> x, y, z = t
>>> x, y, z = t
This is called, appropriately enough, *sequence unpacking* and works for any
This is called, appropriately enough, *sequence unpacking* and works for any
sequence on the right-hand side. Sequence unpacking requires th
e list of
sequence on the right-hand side. Sequence unpacking requires th
at there are as
variables on the left to have the same number of elements as the length of
the
many variables on the left side of the equals sign as there are elements in
the
sequence. Note that multiple assignment is really just a combination of tuple
sequence. Note that multiple assignment is really just a combination of tuple
packing and sequence unpacking.
packing and sequence unpacking.
...
...
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