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
28a6cfae
Kaydet (Commit)
28a6cfae
authored
Agu 28, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use the stricter PyMapping_Check (closes #15801)
üst
2412c93a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
string_tests.py
Lib/test/string_tests.py
+3
-0
NEWS
Misc/NEWS
+3
-0
unicodeobject.c
Objects/unicodeobject.c
+1
-2
No files found.
Lib/test/string_tests.py
Dosyayı görüntüle @
28a6cfae
...
...
@@ -1142,6 +1142,9 @@ class MixinStrUnicodeUserStringTest:
self
.
checkraises
(
TypeError
,
'
%10.*
f'
,
'__mod__'
,
(
'foo'
,
42.
))
self
.
checkraises
(
ValueError
,
'
%10
'
,
'__mod__'
,
(
42
,))
class
X
(
object
):
pass
self
.
checkraises
(
TypeError
,
'abc'
,
'__mod__'
,
X
())
def
test_floatformatting
(
self
):
# float formatting
for
prec
in
range
(
100
):
...
...
Misc/NEWS
Dosyayı görüntüle @
28a6cfae
...
...
@@ -12,6 +12,9 @@ Core and Builtins
- Issue #15761: Fix crash when PYTHONEXECUTABLE is set on Mac OS X.
- Issue #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
Patch by Robin Schreiber.
...
...
Objects/unicodeobject.c
Dosyayı görüntüle @
28a6cfae
...
...
@@ -9504,8 +9504,7 @@ PyObject *PyUnicode_Format(PyObject *format,
arglen
=
-
1
;
argidx
=
-
2
;
}
if
(
Py_TYPE
(
args
)
->
tp_as_mapping
&&
!
PyTuple_Check
(
args
)
&&
!
PyUnicode_Check
(
args
))
if
(
PyMapping_Check
(
args
)
&&
!
PyTuple_Check
(
args
)
&&
!
PyUnicode_Check
(
args
))
dict
=
args
;
while
(
--
fmtcnt
>=
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