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
d3013ffa
Kaydet (Commit)
d3013ffa
authored
Kas 11, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
exec won't take file objects anymore
üst
3e4e72f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
functions.rst
Doc/library/functions.rst
+8
-9
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
d3013ffa
...
@@ -391,16 +391,15 @@ are always available. They are listed here in alphabetical order.
...
@@ -391,16 +391,15 @@ are always available. They are listed here in alphabetical order.
.. function:: exec(object[, globals[, locals]])
.. function:: exec(object[, globals[, locals]])
This function supports dynamic execution of Python code. *object* must be either
This function supports dynamic execution of Python code. *object* must be
a string, an open file object, or a code object. If it is a string, the string
either a string or a code object. If it is a string, the string is parsed as
is parsed as a suite of Python statements which is then executed (unless a
a suite of Python statements which is then executed (unless a syntax error
syntax error occurs). If it is an open file, the file is parsed until EOF and
occurs). If it is a code object, it is simply executed. In all cases, the
executed. If it is a code object, it is simply executed. In all cases, the
code that'
s
executed
is
expected
to
be
valid
as
file
input
(
see
the
section
code that'
s
executed
is
expected
to
be
valid
as
file
input
(
see
the
section
"File input"
in
the
Reference
Manual
).
Be
aware
that
the
:
keyword
:`
return
`
and
"File input"
in
the
Reference
Manual
).
Be
aware
that
the
:
keyword
:`
return
`
:
keyword
:`
yield
`
statements
may
not
be
used
outside
of
function
definitions
eve
n
and
:
keyword
:`
yield
`
statements
may
not
be
used
outside
of
functio
n
within
the
context
of
code
passed
to
the
:
func
:`
exec
`
function
.
The
return
value
definitions
even
within
the
context
of
code
passed
to
the
:
func
:`
exec
`
is
``
None
``.
function
.
The
return
value
is
``
None
``.
In
all
cases
,
if
the
optional
parts
are
omitted
,
the
code
is
executed
in
the
In
all
cases
,
if
the
optional
parts
are
omitted
,
the
code
is
executed
in
the
current
scope
.
If
only
*
globals
*
is
provided
,
it
must
be
a
dictionary
,
which
current
scope
.
If
only
*
globals
*
is
provided
,
it
must
be
a
dictionary
,
which
...
...
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