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
64b7e501
Kaydet (Commit)
64b7e501
authored
Tem 16, 2008
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #3360: Fix incorrect parsing of "020000000000.0".
üst
c83f113c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
test_compile.py
Lib/test/test_compile.py
+4
-0
NEWS
Misc/NEWS
+3
-0
ast.c
Python/ast.c
+1
-10
No files found.
Lib/test/test_compile.py
Dosyayı görüntüle @
64b7e501
...
...
@@ -215,6 +215,10 @@ if 1:
self
.
assertEqual
(
eval
(
"-0b000000000010"
),
-
2
)
self
.
assertEqual
(
eval
(
"0o777"
),
511
)
self
.
assertEqual
(
eval
(
"-0o0000010"
),
-
8
)
self
.
assertEqual
(
eval
(
"020000000000.0"
),
20000000000.0
)
self
.
assertEqual
(
eval
(
"037777777777e0"
),
37777777777.0
)
self
.
assertEqual
(
eval
(
"01000000000000000000000.0"
),
1000000000000000000000.0
)
def
test_unary_minus
(
self
):
# Verify treatment of unary minus on negative numbers SF bug #660455
...
...
Misc/NEWS
Dosyayı görüntüle @
64b7e501
...
...
@@ -10,6 +10,9 @@ What's New in Python 2.6 beta 2?
Core and Builtins
-----------------
- Issue #3360: Fix incorrect parsing of '020000000000.0', which
produced a ValueError instead of giving the correct float.
- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
...
...
Python/ast.c
Dosyayı görüntüle @
64b7e501
...
...
@@ -3139,16 +3139,7 @@ parsenumber(struct compiling *c, const char *s)
#endif
if
(
*
end
==
'l'
||
*
end
==
'L'
)
return
PyLong_FromString
((
char
*
)
s
,
(
char
**
)
0
,
0
);
if
(
s
[
0
]
==
'0'
)
{
x
=
(
long
)
PyOS_strtoul
((
char
*
)
s
,
(
char
**
)
&
end
,
0
);
if
(
x
<
0
&&
errno
==
0
)
{
return
PyLong_FromString
((
char
*
)
s
,
(
char
**
)
0
,
0
);
}
}
else
x
=
PyOS_strtol
((
char
*
)
s
,
(
char
**
)
&
end
,
0
);
x
=
PyOS_strtol
((
char
*
)
s
,
(
char
**
)
&
end
,
0
);
if
(
*
end
==
'\0'
)
{
if
(
errno
!=
0
)
return
PyLong_FromString
((
char
*
)
s
,
(
char
**
)
0
,
0
);
...
...
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