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
3e6ab171
Kaydet (Commit)
3e6ab171
authored
Ock 02, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
avoid parameter name clash (closes #20108)
üst
3a990c69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
inspect.py
Lib/inspect.py
+3
-1
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/inspect.py
Dosyayı görüntüle @
3e6ab171
...
@@ -985,12 +985,14 @@ def _too_many(f_name, args, kwonly, varargs, defcount, given, values):
...
@@ -985,12 +985,14 @@ def _too_many(f_name, args, kwonly, varargs, defcount, given, values):
(
f_name
,
sig
,
"s"
if
plural
else
""
,
given
,
kwonly_sig
,
(
f_name
,
sig
,
"s"
if
plural
else
""
,
given
,
kwonly_sig
,
"was"
if
given
==
1
and
not
kwonly_given
else
"were"
))
"was"
if
given
==
1
and
not
kwonly_given
else
"were"
))
def
getcallargs
(
func
,
*
positional
,
**
named
):
def
getcallargs
(
*
func_and_
positional
,
**
named
):
"""Get the mapping of arguments to values.
"""Get the mapping of arguments to values.
A dict is returned, with keys the function argument names (including the
A dict is returned, with keys the function argument names (including the
names of the * and ** arguments, if any), and values the respective bound
names of the * and ** arguments, if any), and values the respective bound
values from 'positional' and 'named'."""
values from 'positional' and 'named'."""
func
=
func_and_positional
[
0
]
positional
=
func_and_positional
[
1
:]
spec
=
getfullargspec
(
func
)
spec
=
getfullargspec
(
func
)
args
,
varargs
,
varkw
,
defaults
,
kwonlyargs
,
kwonlydefaults
,
ann
=
spec
args
,
varargs
,
varkw
,
defaults
,
kwonlyargs
,
kwonlydefaults
,
ann
=
spec
f_name
=
func
.
__name__
f_name
=
func
.
__name__
...
...
Misc/NEWS
Dosyayı görüntüle @
3e6ab171
...
@@ -29,6 +29,8 @@ Core and Builtins
...
@@ -29,6 +29,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #20108: Avoid parameter name clash in inspect.getcallargs().
- Issue #12692: Backport the fix for ResourceWarning in test_urllib2net. This
- Issue #12692: Backport the fix for ResourceWarning in test_urllib2net. This
also helps in closing the socket when Connection Close header is not sent.
also helps in closing the socket when Connection Close header is not sent.
...
...
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