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
850be0fb
Kaydet (Commit)
850be0fb
authored
Kas 09, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improve namedtuple doc string examples
üst
5e2e7002
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
collections.rst
Doc/library/collections.rst
+2
-2
3.5.rst
Doc/whatsnew/3.5.rst
+1
-1
No files found.
Doc/library/collections.rst
Dosyayı görüntüle @
850be0fb
...
@@ -929,10 +929,10 @@ Docstrings can be customized by making direct assignments to the ``__doc__``
...
@@ -929,10 +929,10 @@ Docstrings can be customized by making direct assignments to the ``__doc__``
fields:
fields:
>>> Book = namedtuple('Book', ['id', 'title', 'authors'])
>>> Book = namedtuple('Book', ['id', 'title', 'authors'])
>>> Book.__doc__
= '
Hardcover book in active collection'
>>> Book.__doc__
+= ':
Hardcover book in active collection'
>>> Book.id.__doc__ = '13-digit ISBN'
>>> Book.id.__doc__ = '13-digit ISBN'
>>> Book.title.__doc__ = 'Title of first printing'
>>> Book.title.__doc__ = 'Title of first printing'
>>> Book.author.__doc__ = 'List of authors sorted by last name'
>>> Book.author
s
.__doc__ = 'List of authors sorted by last name'
Default values can be implemented by using :meth:`_replace` to
Default values can be implemented by using :meth:`_replace` to
customize a prototype instance:
customize a prototype instance:
...
...
Doc/whatsnew/3.5.rst
Dosyayı görüntüle @
850be0fb
...
@@ -865,7 +865,7 @@ and improves their substitutability for lists.
...
@@ -865,7 +865,7 @@ and improves their substitutability for lists.
Docstrings produced by :func:`~collections.namedtuple` can now be updated::
Docstrings produced by :func:`~collections.namedtuple` can now be updated::
Point = namedtuple('
Point
', ['
x
', '
y
'])
Point = namedtuple('
Point
', ['
x
', '
y
'])
Point.__doc__
= '
ordered
pair
'
Point.__doc__
+= '
:
Cartesian
coodinate
'
Point.x.__doc__ = '
abscissa
'
Point.x.__doc__ = '
abscissa
'
Point.y.__doc__ = '
ordinate
'
Point.y.__doc__ = '
ordinate
'
...
...
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