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
b7136608
Kaydet (Commit)
b7136608
authored
Agu 09, 2006
tarafından
Andrew M. Kuchling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[Bug #1536021] Mention __hash__ change
üst
ab2f8f7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+10
-2
No files found.
Doc/whatsnew/whatsnew25.tex
Dosyayı görüntüle @
b7136608
...
...
@@ -3,7 +3,6 @@
% $Id$
% Fix XXX comments
% Count up the patches and bugs
\title
{
What's New in Python 2.5
}
\release
{
0.9
}
...
...
@@ -1100,10 +1099,10 @@ print d[3], d[4] # Prints 0, 0
\item
Both 8-bit and Unicode strings have new
\method
{
partition(sep)
}
and
\method
{
rpartition(sep)
}
methods that simplify a common use case.
The
\method
{
find(S)
}
method is often used to get an index which is
then used to slice the string and obtain the pieces that are before
and after the separator.
\method
{
partition(sep)
}
condenses this
pattern into a single method call that returns a 3-tuple containing
the substring before the separator, the separator itself, and the
...
...
@@ -1165,6 +1164,15 @@ returned by the iterator is true; otherwise it will return
all of the values returned by the iterator evaluate as true.
(Suggested by Guido van~Rossum, and implemented by Raymond Hettinger.)
\item
The result of a class's
\method
{__
hash
__
()
}
method can now
be either a long integer or a regular integer. If a long integer is
returned, the hash of that value is taken. In earlier versions the
hash value was required to be a regular integer, but in 2.5 the
\function
{
id()
}
built-in was changed to always return non-negative
numbers, and users often seem to use
\code
{
id(self)
}
in
\method
{__
hash
__
()
}
methods (though this is discouraged).
% Bug #1536021
\item
ASCII is now the default encoding for modules. It's now
a syntax error if a module contains string literals with 8-bit
characters but doesn't have an encoding declaration. In Python 2.4
...
...
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