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
f2f55e7f
Unverified
Kaydet (Commit)
f2f55e7f
authored
Mar 13, 2019
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Mar 13, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36282: Improved error message for too much positional arguments. (GH-12310)
üst
d53fe5f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
test_call.py
Lib/test/test_call.py
+1
-1
2019-03-13-22-47-28.bpo-36282.zs7RKP.rst
...ore and Builtins/2019-03-13-22-47-28.bpo-36282.zs7RKP.rst
+2
-0
getargs.c
Python/getargs.c
+1
-1
No files found.
Lib/test/test_call.py
Dosyayı görüntüle @
f2f55e7f
...
...
@@ -157,7 +157,7 @@ class CFunctionCallsErrorMessages(unittest.TestCase):
self
.
assertRaisesRegex
(
TypeError
,
msg
,
{}
.
__contains__
,
0
,
1
)
def
test_varargs3
(
self
):
msg
=
r"^from_bytes\(\) takes
at most
2 positional arguments \(3 given\)"
msg
=
r"^from_bytes\(\) takes
exactly
2 positional arguments \(3 given\)"
self
.
assertRaisesRegex
(
TypeError
,
msg
,
int
.
from_bytes
,
b
'a'
,
'little'
,
False
)
def
test_varargs1min
(
self
):
...
...
Misc/NEWS.d/next/Core and Builtins/2019-03-13-22-47-28.bpo-36282.zs7RKP.rst
0 → 100644
Dosyayı görüntüle @
f2f55e7f
Improved error message for too much positional arguments in some builtin
functions.
Python/getargs.c
Dosyayı görüntüle @
f2f55e7f
...
...
@@ -2137,7 +2137,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
"%.200s%s takes %s %d positional argument%s (%d given)"
,
(
parser
->
fname
==
NULL
)
?
"function"
:
parser
->
fname
,
(
parser
->
fname
==
NULL
)
?
""
:
"()"
,
(
parser
->
min
!=
INT_MAX
)
?
"at most"
:
"exactly"
,
(
parser
->
min
<
parser
->
max
)
?
"at most"
:
"exactly"
,
parser
->
max
,
parser
->
max
==
1
?
""
:
"s"
,
nargs
);
...
...
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