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
3259ef3d
Kaydet (Commit)
3259ef3d
authored
Mar 15, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5493: clarify __nonzero__ docs.
üst
4c95e091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
datamodel.rst
Doc/reference/datamodel.rst
+5
-4
No files found.
Doc/reference/datamodel.rst
Dosyayı görüntüle @
3259ef3d
...
@@ -1424,11 +1424,12 @@ Basic customization
...
@@ -1424,11 +1424,12 @@ Basic customization
.. index:: single: __len__() (mapping object method)
.. index:: single: __len__() (mapping object method)
Called to implement truth value testing
,
and the built-in operation ``bool()``;
Called to implement truth value testing and the built-in operation ``bool()``;
should return ``False`` or ``True``, or their integer equivalents ``0`` or
should return ``False`` or ``True``, or their integer equivalents ``0`` or
``1``. When this method is not defined, :meth:`__len__` is called, if it is
``1``. When this method is not defined, :meth:`__len__` is called, if it is
defined (see below). If a class defines neither :meth:`__len__` nor
defined, and the object is considered true if its result is nonzero.
:meth:`__nonzero__`, all its instances are considered true.
If a class defines neither :meth:`__len__` nor :meth:`__nonzero__`, all its
instances are considered true.
.. method:: object.__unicode__(self)
.. method:: object.__unicode__(self)
...
...
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