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
f032a002
Kaydet (Commit)
f032a002
authored
Tem 19, 2008
tarafından
Eric Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix issue 3411: default float format spec fails on negative numbers.
üst
1e8fba72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
test_types.py
Lib/test/test_types.py
+6
-0
pystrtod.c
Python/pystrtod.c
+4
-0
No files found.
Lib/test/test_types.py
Dosyayı görüntüle @
f032a002
...
...
@@ -570,6 +570,12 @@ class TypesTests(unittest.TestCase):
test
(
0.01
,
''
,
'0.01'
)
test
(
0.01
,
'g'
,
'0.01'
)
# test for issue 3411
test
(
1.23
,
'1'
,
'1.23'
)
test
(
-
1.23
,
'1'
,
'-1.23'
)
test
(
1.23
,
'1g'
,
'1.23'
)
test
(
-
1.23
,
'1g'
,
'-1.23'
)
test
(
1.0
,
' g'
,
' 1'
)
test
(
-
1.0
,
' g'
,
'-1'
)
test
(
1.0
,
'+g'
,
'+1'
)
...
...
Python/pystrtod.c
Dosyayı görüntüle @
f032a002
...
...
@@ -302,6 +302,10 @@ ensure_decimal_point(char* buffer, size_t buf_size)
/* search for the first non-digit character */
char
*
p
=
buffer
;
if
(
*
p
==
'-'
||
*
p
==
'+'
)
/* Skip leading sign, if present. I think this could only
ever be '-', but it can't hurt to check for both. */
++
p
;
while
(
*
p
&&
isdigit
(
Py_CHARMASK
(
*
p
)))
++
p
;
...
...
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