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
5cb29a49
Kaydet (Commit)
5cb29a49
authored
Agu 28, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix a number of minor markup errors, and improve the consistency a bit.
üst
46ccd1da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
libcodeop.tex
Doc/lib/libcodeop.tex
+16
-16
No files found.
Doc/lib/libcodeop.tex
Dosyayı görüntüle @
5cb29a49
...
...
@@ -9,20 +9,20 @@
\modulesynopsis
{
Compile (possibly incomplete) Python code.
}
The
\module
{
codeop
}
module provides utilities upon which the Python
read-eval-print loop can be emulated
-- as in the
\refmodule
{
code
}
module. As a result, you probably don't want to use the modul
e
directly -- if you want to include such a loop in your program you
pro
bably want to use the
\refmodule
{
code
}
instead.
read-eval-print loop can be emulated
, as is done in the
\refmodule
{
code
}
module. As a result, you probably don't want to us
e
the module directly; if you want to include such a loop in your
pro
gram you probably want to use the
\refmodule
{
code
}
module
instead.
There are two parts to this job:
\begin{
list
}
\list
item
Being able to tell if a line of input completes a Python
statement -- in short telling whether to print ``>>> '' or
``... '
' next.
\list
item
Remembering which future statements the user has entered, so
subsequent input can be compiled wiht
these in effect.
\end{
list
}
\begin{
enumerate
}
\
item
Being able to tell if a line of input completes a Python
statement: in short, telling whether to print
`
\code
{
>
\code
{
>
}
>~
}
or `
\code
{
...~
}
' next.
\
item
Remembering which future statements the user has entered, so
subsequent input can be compiled with
these in effect.
\end{
enumerate
}
The
\module
{
codeop
}
module provides a way of doing each of these
things, and a way of doing them both.
...
...
@@ -58,17 +58,17 @@ for the parser is better.
\end{funcdesc}
\begin{classdesc}
{
Compile
}{}
Instances of this class have
\method
{__
call
__}
methods indentical in
signature to the built-in function
\function
{
compile
}
, but with the
Instances of this class have
\method
{__
call
__
()
}
methods indentical in
signature to the built-in function
\function
{
compile
()
}
, but with the
difference that if the instance compiles program text containing a
\module
{__
future
__}
statement, the instance 'remembers' and compiles
all subsequent program texts with the statement in force.
\end{classdesc}
\begin{classdesc}
{
CommandCompiler
}{}
Instances of this class have
\method
{__
call
__}
methods identical in
signature to
\function
{
compile
_
command
}
; the difference is that if the
instance compiles program text containing a
\method
{__
future
__}
Instances of this class have
\method
{__
call
__
()
}
methods identical in
signature to
\function
{
compile
_
command
()
}
; the difference is that if
the instance compiles program text containing a
\code
{__
future
__}
statement, the instance 'remembers' and compiles all subsequent
program texts with the statement in force.
\end{classdesc}
...
...
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