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
a75d306e
Kaydet (Commit)
a75d306e
authored
Eki 18, 1993
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
"exec" is now a statement. execfile() is obsolete.
(Also added a stub for "access".)
üst
db3165e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
ref6.tex
Doc/ref/ref6.tex
+39
-0
ref6.tex
Doc/ref6.tex
+39
-0
No files found.
Doc/ref/ref6.tex
Dosyayı görüntüle @
a75d306e
...
...
@@ -17,6 +17,8 @@ simple_stmt: expression_stmt
| continue
_
stmt
| import
_
stmt
| global
_
stmt
| access
_
stmt
| exec
_
stmt
\end{verbatim}
\section
{
Expression statements
}
...
...
@@ -466,3 +468,40 @@ definition, function definition, or \verb\import\ statement.
restrictions, but programs should not abuse this freedom, as future
implementations may enforce them or silently change the meaning of the
program.)
\section
{
The
{
\tt
access
}
statement
}
\label
{
access
}
\stindex
{
access
}
\begin{verbatim}
access
_
stmt: "access" ...
\end{verbatim}
This statement will be used in the future to control access to
instance and class variables. Currently its syntax and effects are
undefined; however the keyword
\verb
\
access
\
is a reserved word for
the parser.
\section
{
The
{
\tt
exec
}
statement
}
\label
{
exec
}
\stindex
{
exec
}
\begin{verbatim}
exec
_
stmt: "exec" expression ["in" expression ["," expression]]
\end{verbatim}
This statement supports dynamic execution of Python code. The first
expression should evaluate to either a string, an open file object, or
a code object. If it is a string, the string is parsed as a suite of
Python statements which is then executed (unless a syntax error
occurs). If it is an open file, the file is parsed until EOF and
executed. If it is a code object, it is simply executed.
In all cases, if the optional parts are omitted, the code is executed
in the current scope. If only the first expression after
\verb
\
in
\
is
specified, it should be a dictionary, which will be used for both the
global and the local variables. If two expressions are given, both
must be dictionaries and they are used for the global and local
variables, respectively.
Note: dynamic evaluation of expressions is supported by the built-in
function
\verb
\
eval
\
.
Doc/ref6.tex
Dosyayı görüntüle @
a75d306e
...
...
@@ -17,6 +17,8 @@ simple_stmt: expression_stmt
| continue
_
stmt
| import
_
stmt
| global
_
stmt
| access
_
stmt
| exec
_
stmt
\end{verbatim}
\section
{
Expression statements
}
...
...
@@ -466,3 +468,40 @@ definition, function definition, or \verb\import\ statement.
restrictions, but programs should not abuse this freedom, as future
implementations may enforce them or silently change the meaning of the
program.)
\section
{
The
{
\tt
access
}
statement
}
\label
{
access
}
\stindex
{
access
}
\begin{verbatim}
access
_
stmt: "access" ...
\end{verbatim}
This statement will be used in the future to control access to
instance and class variables. Currently its syntax and effects are
undefined; however the keyword
\verb
\
access
\
is a reserved word for
the parser.
\section
{
The
{
\tt
exec
}
statement
}
\label
{
exec
}
\stindex
{
exec
}
\begin{verbatim}
exec
_
stmt: "exec" expression ["in" expression ["," expression]]
\end{verbatim}
This statement supports dynamic execution of Python code. The first
expression should evaluate to either a string, an open file object, or
a code object. If it is a string, the string is parsed as a suite of
Python statements which is then executed (unless a syntax error
occurs). If it is an open file, the file is parsed until EOF and
executed. If it is a code object, it is simply executed.
In all cases, if the optional parts are omitted, the code is executed
in the current scope. If only the first expression after
\verb
\
in
\
is
specified, it should be a dictionary, which will be used for both the
global and the local variables. If two expressions are given, both
must be dictionaries and they are used for the global and local
variables, respectively.
Note: dynamic evaluation of expressions is supported by the built-in
function
\verb
\
eval
\
.
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