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
4d6e8fe5
Kaydet (Commit)
4d6e8fe5
authored
Tem 16, 2003
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify the lack of relationship between rich comparison operators.
Prompted by a discussion on comp.lang.python.
üst
71adf7e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
ref3.tex
Doc/ref/ref3.tex
+5
-0
No files found.
Doc/ref/ref3.tex
Dosyayı görüntüle @
4d6e8fe5
...
...
@@ -1089,6 +1089,11 @@ used in a Boolean context, the return value should be interpretable as
a Boolean value, else a
\exception
{
TypeError
}
will be raised.
By convention,
\code
{
False
}
is used for false and
\code
{
True
}
for true.
There are no implied relationships among the comparison operators.
The truth of
{
\var
{
x
}
==
\var
{
y
}}
does not imply that
\code
{
\var
{
x
}
!=
\var
{
y
}}
is false. Accordingly, when defining
\method
{__
eq
__}
, one should also
define
\method
{__
ne
__}
so that the operators will behave as expected.
There are no reflected (swapped-argument) versions of these methods
(to be used when the left argument does not support the operation but
the right argument does); rather,
\method
{__
lt
__
()
}
and
...
...
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