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
897b8212
Kaydet (Commit)
897b8212
authored
Mar 23, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make it illegal to assign to __debug__ as per Guido's request.
üst
e280c06d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
compile.c
Python/compile.c
+12
-1
No files found.
Python/compile.c
Dosyayı görüntüle @
897b8212
...
...
@@ -66,6 +66,9 @@ int Py_OptimizeFlag = 0;
#define LATE_FUTURE \
"from __future__ imports must occur at the beginning of the file"
#define ASSIGN_DEBUG \
"can not assign to __debug__"
#define MANGLE_LEN 256
#define OFF(x) offsetof(PyCodeObject, x)
...
...
@@ -5181,8 +5184,16 @@ symtable_assign(struct symtable *st, node *n, int flag)
if
(
TYPE
(
tmp
)
==
LPAR
||
TYPE
(
tmp
)
==
LSQB
)
{
n
=
CHILD
(
n
,
1
);
goto
loop
;
}
else
if
(
TYPE
(
tmp
)
==
NAME
)
}
else
if
(
TYPE
(
tmp
)
==
NAME
)
{
if
(
strcmp
(
STR
(
tmp
),
"__debug__"
)
==
0
)
{
PyErr_SetString
(
PyExc_SyntaxError
,
ASSIGN_DEBUG
);
PyErr_SyntaxLocation
(
st
->
st_filename
,
n
->
n_lineno
);
st
->
st_errors
++
;
}
symtable_add_def
(
st
,
STR
(
tmp
),
DEF_LOCAL
|
flag
);
}
return
;
case
dotted_as_name
:
if
(
NCH
(
n
)
==
3
)
...
...
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