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
735d3172
Kaydet (Commit)
735d3172
authored
Eki 26, 2012
tarafından
Andrew Svetlov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16243: add example for inspect.formatargspec
Patch by Berker Peksag.
üst
6a65bcdf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
inspect.rst
Doc/library/inspect.rst
+9
-2
No files found.
Doc/library/inspect.rst
Dosyayı görüntüle @
735d3172
...
@@ -716,7 +716,7 @@ Classes and functions
...
@@ -716,7 +716,7 @@ Classes and functions
locals dictionary of the given frame.
locals dictionary of the given frame.
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations
, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations
])
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations
[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]
])
Format a pretty argument spec from the values returned by
Format a pretty argument spec from the values returned by
:func:`getargspec` or :func:`getfullargspec`.
:func:`getargspec` or :func:`getfullargspec`.
...
@@ -725,7 +725,14 @@ Classes and functions
...
@@ -725,7 +725,14 @@ Classes and functions
``defaults``, ``kwonlyargs``, ``kwonlydefaults``, ``annotations``). The
``defaults``, ``kwonlyargs``, ``kwonlydefaults``, ``annotations``). The
other five arguments are the corresponding optional formatting functions
other five arguments are the corresponding optional formatting functions
that are called to turn names and values into strings. The last argument
that are called to turn names and values into strings. The last argument
is an optional function to format the sequence of arguments.
is an optional function to format the sequence of arguments. For example::
>>> from inspect import formatargspec, getfullargspec
>>> def f(a: int, b: float):
... pass
...
>>> formatargspec(*getfullargspec(f))
'(a: int, b: float)'
.. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
.. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
...
...
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