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
9df10028
Kaydet (Commit)
9df10028
authored
Eki 01, 2018
tarafından
Brendan Jurd
Kaydeden (comit)
Raymond Hettinger
Eki 01, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix name of argument in docs for functools.reduce(). (#9634)
üst
5fa247d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
functools.rst
Doc/library/functools.rst
+6
-6
No files found.
Doc/library/functools.rst
Dosyayı görüntüle @
9df10028
...
@@ -280,14 +280,14 @@ The :mod:`functools` module defines the following functions:
...
@@ -280,14 +280,14 @@ The :mod:`functools` module defines the following functions:
.. function:: reduce(function, iterable[, initializer])
.. function:: reduce(function, iterable[, initializer])
Apply *function* of two arguments cumulatively to the items of *
sequenc
e*, from
Apply *function* of two arguments cumulatively to the items of *
iterabl
e*, from
left to right, so as to reduce the
sequenc
e to a single value. For example,
left to right, so as to reduce the
iterabl
e to a single value. For example,
``reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])`` calculates ``((((1+2)+3)+4)+5)``.
``reduce(lambda x, y: x+y, [1, 2, 3, 4, 5])`` calculates ``((((1+2)+3)+4)+5)``.
The left argument, *x*, is the accumulated value and the right argument, *y*, is
The left argument, *x*, is the accumulated value and the right argument, *y*, is
the update value from the *
sequenc
e*. If the optional *initializer* is present,
the update value from the *
iterabl
e*. If the optional *initializer* is present,
it is placed before the items of the
sequenc
e in the calculation, and serves as
it is placed before the items of the
iterabl
e in the calculation, and serves as
a default when the
sequenc
e is empty. If *initializer* is not given and
a default when the
iterabl
e is empty. If *initializer* is not given and
*
sequenc
e* contains only one item, the first item is returned.
*
iterabl
e* contains only one item, the first item is returned.
Roughly equivalent to::
Roughly equivalent to::
...
...
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