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
87e611e4
Kaydet (Commit)
87e611e4
authored
Ock 06, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace the docs for reduce with an adaptation of its docstring, which
was actually clearer!
üst
74429eac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
libfuncs.tex
Doc/lib/libfuncs.tex
+9
-8
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
87e611e4
...
@@ -501,14 +501,15 @@ If the \module{readline} module was loaded, then
...
@@ -501,14 +501,15 @@ If the \module{readline} module was loaded, then
line editing and history features.
line editing and history features.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
reduce
}{
function, list
\optional
{
, initializer
}}
\begin{funcdesc}
{
reduce
}{
function, sequence
\optional
{
, initializer
}}
Apply the binary
\var
{
function
}
to the items of
\var
{
list
}
so as to
Apply
\var
{
function
}
of two arguments cumulatively to the items of
reduce the list to a single value. E.g.,
\var
{
sequence
}
, from left to right, so as to reduce the sequence to
\code
{
reduce(lambda x, y: x*y,
\var
{
list
}
, 1)
}
returns the product of
a single value. For example,
the elements of
\var
{
list
}
. The optional
\var
{
initializer
}
can be
\code
{
reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])
}
calculates
thought of as being prepended to
\var
{
list
}
so as to allow reduction
\code
{
((((1+2)+3)+4)+5)
}
.
of an empty
\var
{
list
}
. The
\var
{
list
}
arguments may be any kind of
If the optional
\var
{
initializer
}
is present, it is placed before the
sequence.
items of the sequence in the calculation, and serves as a default when
the sequence is empty.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
reload
}{
module
}
\begin{funcdesc}
{
reload
}{
module
}
...
...
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