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
fb502e96
Kaydet (Commit)
fb502e96
authored
Tem 07, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
documented globals() and locals()
üst
abfa2cae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
8 deletions
+42
-8
libfuncs.tex
Doc/lib/libfuncs.tex
+21
-4
libfuncs.tex
Doc/libfuncs.tex
+21
-4
No files found.
Doc/lib/libfuncs.tex
Dosyayı görüntüle @
fb502e96
...
@@ -47,8 +47,11 @@ exactly one argument.)
...
@@ -47,8 +47,11 @@ exactly one argument.)
give the file from which the code was read; pass e.g.
\code
{
'<string>'
}
give the file from which the code was read; pass e.g.
\code
{
'<string>'
}
if it wasn't read from a file. The
\var
{
kind
}
argument specifies
if it wasn't read from a file. The
\var
{
kind
}
argument specifies
what kind of code must be compiled; it can be
\code
{
'exec'
}
if
what kind of code must be compiled; it can be
\code
{
'exec'
}
if
\var
{
string
}
consists of a sequence of statements, or
\code
{
'eval'
}
\var
{
string
}
consists of a sequence of statements,
\code
{
'eval'
}
if it consists of a single expression.
if it consists of a single expression, or
\code
{
'single'
}
if
it consists of a single interactive statement (in the latter case,
expression statements that evaluate to something else than
\code
{
None
}
will printed).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
...
@@ -112,8 +115,9 @@ exactly one argument.)
...
@@ -112,8 +115,9 @@ exactly one argument.)
Hints: dynamic execution of statements is supported by the
Hints: dynamic execution of statements is supported by the
\code
{
exec
}
statement. Execution of statements from a file is
\code
{
exec
}
statement. Execution of statements from a file is
supported by the
\code
{
execfile()
}
function. The
\code
{
vars()
}
supported by the
\code
{
execfile()
}
function. The
\code
{
globals()
}
function returns the current local dictionary, which may be useful
and
\code
{
locals()
}
functions returns the current global and local
dictionary, respectively, which may be useful
to pass around for use by
\code
{
eval()
}
or
\code
{
execfile()
}
.
to pass around for use by
\code
{
eval()
}
or
\code
{
execfile()
}
.
\end{funcdesc}
\end{funcdesc}
...
@@ -158,6 +162,13 @@ removed.
...
@@ -158,6 +162,13 @@ removed.
\code
{
\var
{
x
}
.
\var
{
foobar
}}
.
\code
{
\var
{
x
}
.
\var
{
foobar
}}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
globals
}{}
Return a dictionary representing the current global symbol table.
This is always the dictionary of the current module (inside a
function or method, this is the module where it is defined, not the
module from which it is called).
\end{funcdesc}
\begin{funcdesc}
{
hasattr
}{
object
\,
name
}
\begin{funcdesc}
{
hasattr
}{
object
\,
name
}
The arguments are an object and a string. The result is 1 if the
The arguments are an object and a string. The result is 1 if the
string is the name of one of the object's attributes, 0 if not.
string is the name of one of the object's attributes, 0 if not.
...
@@ -206,6 +217,12 @@ removed.
...
@@ -206,6 +217,12 @@ removed.
may be a sequence (string, tuple or list) or a mapping (dictionary).
may be a sequence (string, tuple or list) or a mapping (dictionary).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
locals
}{}
Return a dictionary representing the current local symbol table.
Inside a function, modifying this dictionary does not always have the
desired effect.
\end{funcdesc}
\begin{funcdesc}
{
long
}{
x
}
\begin{funcdesc}
{
long
}{
x
}
Convert a number to a long integer. The argument may be a plain or
Convert a number to a long integer. The argument may be a plain or
long integer or a floating point number.
long integer or a floating point number.
...
...
Doc/libfuncs.tex
Dosyayı görüntüle @
fb502e96
...
@@ -47,8 +47,11 @@ exactly one argument.)
...
@@ -47,8 +47,11 @@ exactly one argument.)
give the file from which the code was read; pass e.g.
\code
{
'<string>'
}
give the file from which the code was read; pass e.g.
\code
{
'<string>'
}
if it wasn't read from a file. The
\var
{
kind
}
argument specifies
if it wasn't read from a file. The
\var
{
kind
}
argument specifies
what kind of code must be compiled; it can be
\code
{
'exec'
}
if
what kind of code must be compiled; it can be
\code
{
'exec'
}
if
\var
{
string
}
consists of a sequence of statements, or
\code
{
'eval'
}
\var
{
string
}
consists of a sequence of statements,
\code
{
'eval'
}
if it consists of a single expression.
if it consists of a single expression, or
\code
{
'single'
}
if
it consists of a single interactive statement (in the latter case,
expression statements that evaluate to something else than
\code
{
None
}
will printed).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
\begin{funcdesc}
{
delattr
}{
object
\,
name
}
...
@@ -112,8 +115,9 @@ exactly one argument.)
...
@@ -112,8 +115,9 @@ exactly one argument.)
Hints: dynamic execution of statements is supported by the
Hints: dynamic execution of statements is supported by the
\code
{
exec
}
statement. Execution of statements from a file is
\code
{
exec
}
statement. Execution of statements from a file is
supported by the
\code
{
execfile()
}
function. The
\code
{
vars()
}
supported by the
\code
{
execfile()
}
function. The
\code
{
globals()
}
function returns the current local dictionary, which may be useful
and
\code
{
locals()
}
functions returns the current global and local
dictionary, respectively, which may be useful
to pass around for use by
\code
{
eval()
}
or
\code
{
execfile()
}
.
to pass around for use by
\code
{
eval()
}
or
\code
{
execfile()
}
.
\end{funcdesc}
\end{funcdesc}
...
@@ -158,6 +162,13 @@ removed.
...
@@ -158,6 +162,13 @@ removed.
\code
{
\var
{
x
}
.
\var
{
foobar
}}
.
\code
{
\var
{
x
}
.
\var
{
foobar
}}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
globals
}{}
Return a dictionary representing the current global symbol table.
This is always the dictionary of the current module (inside a
function or method, this is the module where it is defined, not the
module from which it is called).
\end{funcdesc}
\begin{funcdesc}
{
hasattr
}{
object
\,
name
}
\begin{funcdesc}
{
hasattr
}{
object
\,
name
}
The arguments are an object and a string. The result is 1 if the
The arguments are an object and a string. The result is 1 if the
string is the name of one of the object's attributes, 0 if not.
string is the name of one of the object's attributes, 0 if not.
...
@@ -206,6 +217,12 @@ removed.
...
@@ -206,6 +217,12 @@ removed.
may be a sequence (string, tuple or list) or a mapping (dictionary).
may be a sequence (string, tuple or list) or a mapping (dictionary).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
locals
}{}
Return a dictionary representing the current local symbol table.
Inside a function, modifying this dictionary does not always have the
desired effect.
\end{funcdesc}
\begin{funcdesc}
{
long
}{
x
}
\begin{funcdesc}
{
long
}{
x
}
Convert a number to a long integer. The argument may be a plain or
Convert a number to a long integer. The argument may be a plain or
long integer or a floating point number.
long integer or a floating point number.
...
...
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