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
1cae3f57
Kaydet (Commit)
1cae3f57
authored
Ara 03, 2004
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
AAdd item. (And so it beegins again.)
üst
92e2495a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+18
-1
No files found.
Doc/whatsnew/whatsnew25.tex
Dosyayı görüntüle @
1cae3f57
...
...
@@ -37,7 +37,24 @@ Here are all of the changes that Python 2.5 makes to the core Python
language.
\begin{itemize}
\item
TBD
\item
The
\function
{
min()
}
and
\function
{
max()
}
built-in functions
gained a
\code
{
key
}
keyword argument analogous to the
\code
{
key
}
argument for
\function
{
sort()
}
. This argument supplies a function
that takes a single argument and is called for every value in the list;
\function
{
min()
}
/
\function
{
max()
}
will return the element with the
smallest/largest return value from this function.
For example, to find the longest string in a list, you can do:
\begin{verbatim}
L = ['medium', 'longest', 'short']
# Prints 'longest'
print max(L, key=len)
# Prints 'short', because lexicographically 'short' has the largest value
print max(L)
\end{verbatim}
(Contributed by Steven Bethard and Raymond Hettinger.)
\end{itemize}
...
...
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