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
1721e757
Kaydet (Commit)
1721e757
authored
Mar 30, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix error message -- "expects either 0 or 0 arguments"
üst
1c88e0f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
asdl_c.py
Parser/asdl_c.py
+4
-2
Python-ast.c
Python/Python-ast.c
+4
-2
No files found.
Parser/asdl_c.py
Dosyayı görüntüle @
1721e757
...
@@ -595,8 +595,10 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
...
@@ -595,8 +595,10 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
res = 0; /* if no error occurs, this stays 0 to the end */
res = 0; /* if no error occurs, this stays 0 to the end */
if (PyTuple_GET_SIZE(args) > 0) {
if (PyTuple_GET_SIZE(args) > 0) {
if (numfields != PyTuple_GET_SIZE(args)) {
if (numfields != PyTuple_GET_SIZE(args)) {
PyErr_Format(PyExc_TypeError, "
%.400
s constructor takes either 0 or "
PyErr_Format(PyExc_TypeError, "
%.400
s constructor takes
%
s"
"
%
d positional argument
%
s", Py_TYPE(self)->tp_name,
"
%
" PY_FORMAT_SIZE_T "d positional argument
%
s",
Py_TYPE(self)->tp_name,
numfields == 0 ? "" : "either 0 or ",
numfields, numfields == 1 ? "" : "s");
numfields, numfields == 1 ? "" : "s");
res = -1;
res = -1;
goto cleanup;
goto cleanup;
...
...
Python/Python-ast.c
Dosyayı görüntüle @
1721e757
...
@@ -386,8 +386,10 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
...
@@ -386,8 +386,10 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
res
=
0
;
/* if no error occurs, this stays 0 to the end */
res
=
0
;
/* if no error occurs, this stays 0 to the end */
if
(
PyTuple_GET_SIZE
(
args
)
>
0
)
{
if
(
PyTuple_GET_SIZE
(
args
)
>
0
)
{
if
(
numfields
!=
PyTuple_GET_SIZE
(
args
))
{
if
(
numfields
!=
PyTuple_GET_SIZE
(
args
))
{
PyErr_Format
(
PyExc_TypeError
,
"%.400s constructor takes either 0 or "
PyErr_Format
(
PyExc_TypeError
,
"%.400s constructor takes %s"
"%d positional argument%s"
,
Py_TYPE
(
self
)
->
tp_name
,
"%"
PY_FORMAT_SIZE_T
"d positional argument%s"
,
Py_TYPE
(
self
)
->
tp_name
,
numfields
==
0
?
""
:
"either 0 or "
,
numfields
,
numfields
==
1
?
""
:
"s"
);
numfields
,
numfields
==
1
?
""
:
"s"
);
res
=
-
1
;
res
=
-
1
;
goto
cleanup
;
goto
cleanup
;
...
...
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