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
b065e52b
Kaydet (Commit)
b065e52b
authored
Mar 17, 2009
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix bug in Decimal __format__ method that swapped left and right
alignment.
üst
8cbe9556
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
decimal.py
Lib/decimal.py
+2
-2
test_decimal.py
Lib/test/test_decimal.py
+6
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/decimal.py
Dosyayı görüntüle @
b065e52b
...
...
@@ -5551,9 +5551,9 @@ def _format_align(body, spec_dict):
align
=
spec_dict
[
'align'
]
if
align
==
'<'
:
result
=
padding
+
sign
+
body
elif
align
==
'>'
:
result
=
sign
+
body
+
padding
elif
align
==
'>'
:
result
=
padding
+
sign
+
body
elif
align
==
'='
:
result
=
sign
+
padding
+
body
else
:
#align == '^'
...
...
Lib/test/test_decimal.py
Dosyayı görüntüle @
b065e52b
...
...
@@ -704,6 +704,12 @@ class DecimalFormatTest(unittest.TestCase):
(
'.0g'
,
'-sNaN'
,
'-sNaN'
),
(
''
,
'1.00'
,
'1.00'
),
# check alignment
(
'<6'
,
'123'
,
'123 '
),
(
'>6'
,
'123'
,
' 123'
),
(
'^6'
,
'123'
,
' 123 '
),
(
'=+6'
,
'123'
,
'+ 123'
),
]
for
fmt
,
d
,
result
in
test_values
:
self
.
assertEqual
(
format
(
Decimal
(
d
),
fmt
),
result
)
...
...
Misc/NEWS
Dosyayı görüntüle @
b065e52b
...
...
@@ -174,6 +174,9 @@ Core and Builtins
Library
-------
- Fix Decimal.__format__ bug that swapped the meanings of the '<' and
'>' alignment characters.
- Issue #1222: locale.format() bug when the thousands separator is a space
character.
...
...
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