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
34906550
Kaydet (Commit)
34906550
authored
Tem 26, 2013
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #18539: Calltips now work for float default arguments.
üst
d5648ac3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
CallTips.py
Lib/idlelib/CallTips.py
+1
-1
test_calltips.py
Lib/idlelib/idle_test/test_calltips.py
+6
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/idlelib/CallTips.py
Dosyayı görüntüle @
34906550
...
@@ -163,7 +163,7 @@ def get_arg_text(ob):
...
@@ -163,7 +163,7 @@ def get_arg_text(ob):
if
fob
.
func_code
.
co_flags
&
0x8
:
if
fob
.
func_code
.
co_flags
&
0x8
:
items
.
append
(
"***"
)
items
.
append
(
"***"
)
arg_text
=
", "
.
join
(
items
)
arg_text
=
", "
.
join
(
items
)
arg_text
=
"(
%
s)"
%
re
.
sub
(
"
\
.
\
d+"
,
"<tuple>"
,
arg_text
)
arg_text
=
"(
%
s)"
%
re
.
sub
(
"
(?<!
\
d)
\
.
\
d+"
,
"<tuple>"
,
arg_text
)
# See if we can use the docstring
# See if we can use the docstring
doc
=
getattr
(
ob
,
"__doc__"
,
""
)
doc
=
getattr
(
ob
,
"__doc__"
,
""
)
if
doc
:
if
doc
:
...
...
Lib/idlelib/idle_test/test_calltips.py
Dosyayı görüntüle @
34906550
...
@@ -10,5 +10,11 @@ class Test_get_entity(unittest.TestCase):
...
@@ -10,5 +10,11 @@ class Test_get_entity(unittest.TestCase):
def
test_good_entity
(
self
):
def
test_good_entity
(
self
):
self
.
assertIs
(
CTi
.
get_entity
(
'int'
),
int
)
self
.
assertIs
(
CTi
.
get_entity
(
'int'
),
int
)
class
Py2Test
(
unittest
.
TestCase
):
def
test_paramtuple_float
(
self
):
# 18539: (a,b) becomes '.0' in code object; change that but not float
def
f
((
a
,
b
),
c
=
0.0
):
pass
self
.
assertEqual
(
ct
.
get_arg_text
(
f
),
'(<tuple>, c=0.0)'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
unittest
.
main
(
verbosity
=
2
,
exit
=
False
)
unittest
.
main
(
verbosity
=
2
,
exit
=
False
)
Misc/NEWS
Dosyayı görüntüle @
34906550
...
@@ -104,6 +104,8 @@ IDLE
...
@@ -104,6 +104,8 @@ IDLE
changed when it has not been changed. This fix followed the addition of a
changed when it has not been changed. This fix followed the addition of a
test file originally written by Phil Webster (the issue's main goal).
test file originally written by Phil Webster (the issue's main goal).
- Issue #18539: Calltips now work for float default arguments.
- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
...
...
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