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
fcc500eb
Kaydet (Commit)
fcc500eb
authored
Mar 31, 2010
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Silence a py3k warning.
üst
eb72991f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
test_inspect.py
Lib/test/test_inspect.py
+6
-3
No files found.
Lib/test/test_inspect.py
Dosyayı görüntüle @
fcc500eb
...
@@ -593,9 +593,12 @@ class TestGetcallargsFunctions(unittest.TestCase):
...
@@ -593,9 +593,12 @@ class TestGetcallargsFunctions(unittest.TestCase):
def
makeCallable
(
self
,
signature
):
def
makeCallable
(
self
,
signature
):
"""Create a function that returns its locals(), excluding the
"""Create a function that returns its locals(), excluding the
autogenerated '.1', '.2', etc. tuple param names (if any)."""
autogenerated '.1', '.2', etc. tuple param names (if any)."""
code
=
(
"lambda
%
s: dict(i for i in locals().items() "
with
check_py3k_warnings
(
"if not is_tuplename(i[0]))"
)
(
"tuple parameter unpacking has been removed"
,
SyntaxWarning
),
return
eval
(
code
%
signature
,
{
'is_tuplename'
:
self
.
is_tuplename
})
quiet
=
True
):
code
=
(
"lambda
%
s: dict(i for i in locals().items() "
"if not is_tuplename(i[0]))"
)
return
eval
(
code
%
signature
,
{
'is_tuplename'
:
self
.
is_tuplename
})
def
test_plain
(
self
):
def
test_plain
(
self
):
f
=
self
.
makeCallable
(
'a, b=1'
)
f
=
self
.
makeCallable
(
'a, b=1'
)
...
...
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