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
4ddbdad8
Kaydet (Commit)
4ddbdad8
authored
Haz 11, 2007
tarafından
Walter Dörwald
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify error formatting. Fix error message in
check_unoptimized().
üst
5d4ede18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
symtable.c
Python/symtable.c
+12
-12
No files found.
Python/symtable.c
Dosyayı görüntüle @
4ddbdad8
...
@@ -385,14 +385,14 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
...
@@ -385,14 +385,14 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
if
(
flags
&
DEF_GLOBAL
)
{
if
(
flags
&
DEF_GLOBAL
)
{
if
(
flags
&
DEF_PARAM
)
{
if
(
flags
&
DEF_PARAM
)
{
PyErr_Format
(
PyExc_SyntaxError
,
PyErr_Format
(
PyExc_SyntaxError
,
"name '%s
' is parameter and global"
,
"name '%U
' is parameter and global"
,
PyUnicode_AsString
(
name
)
);
name
);
return
0
;
return
0
;
}
}
if
(
flags
&
DEF_NONLOCAL
)
{
if
(
flags
&
DEF_NONLOCAL
)
{
PyErr_Format
(
PyExc_SyntaxError
,
PyErr_Format
(
PyExc_SyntaxError
,
"name '%s
' is nonlocal and global"
,
"name '%U
' is nonlocal and global"
,
PyUnicode_AsString
(
name
)
);
name
);
return
0
;
return
0
;
}
}
SET_SCOPE
(
scopes
,
name
,
GLOBAL_EXPLICIT
);
SET_SCOPE
(
scopes
,
name
,
GLOBAL_EXPLICIT
);
...
@@ -405,8 +405,8 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
...
@@ -405,8 +405,8 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
if
(
flags
&
DEF_NONLOCAL
)
{
if
(
flags
&
DEF_NONLOCAL
)
{
if
(
flags
&
DEF_PARAM
)
{
if
(
flags
&
DEF_PARAM
)
{
PyErr_Format
(
PyExc_SyntaxError
,
PyErr_Format
(
PyExc_SyntaxError
,
"name '%s
' is parameter and nonlocal"
,
"name '%U
' is parameter and nonlocal"
,
PyUnicode_AsString
(
name
)
);
name
);
return
0
;
return
0
;
}
}
if
(
!
bound
)
{
if
(
!
bound
)
{
...
@@ -416,8 +416,8 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
...
@@ -416,8 +416,8 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
}
}
if
(
!
PySet_Contains
(
bound
,
name
))
{
if
(
!
PySet_Contains
(
bound
,
name
))
{
PyErr_Format
(
PyExc_SyntaxError
,
PyErr_Format
(
PyExc_SyntaxError
,
"no binding for nonlocal '%
s
' found"
,
"no binding for nonlocal '%
U
' found"
,
PyUnicode_AsString
(
name
)
);
name
);
return
0
;
return
0
;
}
}
...
@@ -517,10 +517,10 @@ check_unoptimized(const PySTEntryObject* ste) {
...
@@ -517,10 +517,10 @@ check_unoptimized(const PySTEntryObject* ste) {
case
OPT_TOPLEVEL
:
/* import * at top-level is fine */
case
OPT_TOPLEVEL
:
/* import * at top-level is fine */
return
1
;
return
1
;
case
OPT_IMPORT_STAR
:
case
OPT_IMPORT_STAR
:
PyOS_snprintf
(
buf
,
sizeof
(
buf
),
PyOS_snprintf
(
buf
,
sizeof
(
buf
),
"import * is not allowed in function '%
.100s
' "
"import * is not allowed in function '%
U
' "
"because it
is
%s"
,
"because it %s"
,
PyUnicode_AsString
(
ste
->
ste_name
)
,
trailer
);
ste
->
ste_name
,
trailer
);
break
;
break
;
}
}
...
...
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