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
772beaaf
Kaydet (Commit)
772beaaf
authored
Haz 14, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1501122: mention __gt__ &co in description of comparison order.
üst
866a5d89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ref5.tex
Doc/ref/ref5.tex
+6
-2
No files found.
Doc/ref/ref5.tex
Dosyayı görüntüle @
772beaaf
...
@@ -907,7 +907,10 @@ The operators \code{<}, \code{>}, \code{==}, \code{>=}, \code{<=}, and
...
@@ -907,7 +907,10 @@ The operators \code{<}, \code{>}, \code{==}, \code{>=}, \code{<=}, and
the values of two objects. The objects need not have the same type.
the values of two objects. The objects need not have the same type.
If both are numbers, they are converted to a common type. Otherwise,
If both are numbers, they are converted to a common type. Otherwise,
objects of different types
\emph
{
always
}
compare unequal, and are
objects of different types
\emph
{
always
}
compare unequal, and are
ordered consistently but arbitrarily.
ordered consistently but arbitrarily. You can control comparison
behavior of objects of non-builtin types by defining a
\code
{__
cmp
__}
method or rich comparison methods like
\code
{__
gt
__}
, described in
section~
\ref
{
specialnames
}
.
(This unusual definition of comparison was used to simplify the
(This unusual definition of comparison was used to simplify the
definition of operations like sorting and the
\keyword
{
in
}
and
definition of operations like sorting and the
\keyword
{
in
}
and
...
@@ -952,7 +955,8 @@ otherwise defined.\footnote{Earlier versions of Python used
...
@@ -952,7 +955,8 @@ otherwise defined.\footnote{Earlier versions of Python used
a dictionary for emptiness by comparing it to
\code
{
\{\}
}
.
}
a dictionary for emptiness by comparing it to
\code
{
\{\}
}
.
}
\item
\item
Most other types compare unequal unless they are the same object;
Most other objects of builtin types compare unequal unless they are
the same object;
the choice whether one object is considered smaller or larger than
the choice whether one object is considered smaller or larger than
another one is made arbitrarily but consistently within one
another one is made arbitrarily but consistently within one
execution of a program.
execution of a program.
...
...
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