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
ebafbb70
Kaydet (Commit)
ebafbb70
authored
Nis 22, 2009
tarafından
Eric Smith
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed issue 5782: formatting with commas didn't work if no specifier type code was given.
üst
5533ff6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
test_types.py
Lib/test/test_types.py
+6
-0
formatter.h
Objects/stringlib/formatter.h
+1
-0
No files found.
Lib/test/test_types.py
Dosyayı görüntüle @
ebafbb70
...
...
@@ -405,6 +405,9 @@ class TypesTests(unittest.TestCase):
test
(
123456
,
"#012X"
,
'0X000001E240'
)
test
(
-
123456
,
"#012X"
,
'-0X00001E240'
)
# issue 5782, commas with no specifier type
test
(
1234
,
'010,'
,
'00,001,234'
)
# make sure these are errors
# precision disallowed
...
...
@@ -632,6 +635,9 @@ class TypesTests(unittest.TestCase):
test
(
-
1234.12341234
,
'013f'
,
'-01234.123412'
)
test
(
-
123456.12341234
,
'011.2f'
,
'-0123456.12'
)
# issue 5782, commas with no specifier type
test
(
1.2
,
'010,.2'
,
'0,000,001.2'
)
# 0 padding with commas
test
(
1234.
,
'011,f'
,
'1,234.000000'
)
test
(
1234.
,
'012,f'
,
'1,234.000000'
)
...
...
Objects/stringlib/formatter.h
Dosyayı görüntüle @
ebafbb70
...
...
@@ -248,6 +248,7 @@ parse_internal_render_format_spec(STRINGLIB_CHAR *format_spec,
case
'G'
:
case
'%'
:
case
'F'
:
case
'\0'
:
/* These are allowed. See PEP 378.*/
break
;
default:
...
...
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