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
70fcdb8b
Kaydet (Commit)
70fcdb8b
authored
Agu 03, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document general mappings for the locals argument for exec and execfile().
üst
a57ec93b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
libfuncs.tex
Doc/lib/libfuncs.tex
+8
-7
ref6.tex
Doc/ref/ref6.tex
+3
-2
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
70fcdb8b
...
@@ -343,13 +343,14 @@ class C:
...
@@ -343,13 +343,14 @@ class C:
and does not create a new module.
\footnote
{
It is used relatively
and does not create a new module.
\footnote
{
It is used relatively
rarely so does not warrant being made into a statement.
}
rarely so does not warrant being made into a statement.
}
The arguments are a file name and two optional dictionaries. The
The arguments are a file name and two optional dictionaries. The file is
file is parsed and evaluated as a sequence of Python statements
parsed and evaluated as a sequence of Python statements (similarly to a
(similarly to a module) using the
\var
{
globals
}
and
\var
{
locals
}
module) using the
\var
{
globals
}
and
\var
{
locals
}
dictionaries as global and
dictionaries as global and local namespace. If the
\var
{
locals
}
local namespace. If provided,
\var
{
locals
}
can be any mapping object.
dictionary is omitted it defaults to the
\var
{
globals
}
dictionary.
\versionchanged
[formerly \var{locals} was required to be a dictionary]
{
2.4
}
If both dictionaries are omitted, the expression is executed in the
If the
\var
{
locals
}
dictionary is omitted it defaults to the
\var
{
globals
}
environment where
\function
{
execfile()
}
is called. The return value is
dictionary. If both dictionaries are omitted, the expression is executed in
the environment where
\function
{
execfile()
}
is called. The return value is
\code
{
None
}
.
\code
{
None
}
.
\warning
{
The default
\var
{
locals
}
act as described for function
\warning
{
The default
\var
{
locals
}
act as described for function
...
...
Doc/ref/ref6.tex
Dosyayı görüntüle @
70fcdb8b
...
@@ -873,8 +873,9 @@ In all cases, if the optional parts are omitted, the code is executed
...
@@ -873,8 +873,9 @@ In all cases, if the optional parts are omitted, the code is executed
in the current scope. If only the first expression after
\keyword
{
in
}
in the current scope. If only the first expression after
\keyword
{
in
}
is specified, it should be a dictionary, which will be used for both
is specified, it should be a dictionary, which will be used for both
the global and the local variables. If two expressions are given,
the global and the local variables. If two expressions are given,
both must be dictionaries and they are used for the global and local
they are used for the global and local variables, respectively.
variables, respectively.
If provided,
\var
{
locals
}
can be any mapping object.
\versionchanged
[formerly \var{locals} was required to be a dictionary]
{
2.4
}
As a side effect, an implementation may insert additional keys into
As a side effect, an implementation may insert additional keys into
the dictionaries given besides those corresponding to variable names
the dictionaries given besides those corresponding to variable names
...
...
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