Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0db01a51
Commit
0db01a51
authored
Aug 01, 1994
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge lost revisions back
parent
1c821e7f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
308 additions
and
262 deletions
+308
-262
Doc/ref/ref6.tex
Doc/ref/ref6.tex
+69
-68
Doc/ref/ref7.tex
Doc/ref/ref7.tex
+77
-55
Doc/ref/ref8.tex
Doc/ref/ref8.tex
+8
-8
Doc/ref6.tex
Doc/ref6.tex
+69
-68
Doc/ref7.tex
Doc/ref7.tex
+77
-55
Doc/ref8.tex
Doc/ref8.tex
+8
-8
No files found.
Doc/ref/ref6.tex
View file @
0db01a51
This diff is collapsed.
Click to expand it.
Doc/ref/ref7.tex
View file @
0db01a51
This diff is collapsed.
Click to expand it.
Doc/ref/ref8.tex
View file @
0db01a51
...
...
@@ -13,9 +13,9 @@ While a language specification need not prescribe how the language
interpreter is invoked, it is useful to have a notion of a complete
Python program. A complete Python program is executed in a minimally
initialized environment: all built-in and standard modules are
available, but none have been initialized, except for
\verb
\
sys
\
(various system services),
\verb
\
__builtin__
\
(built-in functions,
exceptions and
\verb
\
None
\
) and
\verb
\
__main__
\
. The latter is used
available, but none have been initialized, except for
\verb
@
sys
@
(various system services),
\verb
@
__builtin__
@
(built-in functions,
exceptions and
\verb
@
None
@
) and
\verb
@
__main__
@
. The latter is used
to provide the local and global name space for execution of the
complete program.
\bimodindex
{
sys
}
...
...
@@ -29,7 +29,7 @@ The interpreter may also be invoked in interactive mode; in this case,
it does not read and execute a complete program but reads and executes
one statement (possibly compound) at a time. The initial environment
is identical to that of a complete program; each statement is executed
in the name space of
\verb
\
__main__
\
.
in the name space of
\verb
@
__main__
@
.
\index
{
interactive mode
}
Under
{
\UNIX
}
, a complete program can be passed to the interpreter in
...
...
@@ -58,7 +58,7 @@ This syntax is used in the following situations:
\item
when parsing a module;
\item
when parsing a string passed to the
\verb
\
exec
\
statement;
\item
when parsing a string passed to the
\verb
@
exec
@
statement;
\end{itemize}
...
...
@@ -80,14 +80,14 @@ end of the input.
There are two forms of expression input. Both ignore leading
whitespace.
The string argument to
\verb
\
eval()
\
must have the following form:
The string argument to
\verb
@
eval()
@
must have the following form:
\bifuncindex
{
eval
}
\begin{verbatim}
eval
_
input: condition
_
list NEWLINE*
\end{verbatim}
The input line read by
\verb
\
input()
\
must have the following form:
The input line read by
\verb
@
input()
@
must have the following form:
\bifuncindex
{
input
}
\begin{verbatim}
...
...
@@ -95,7 +95,7 @@ input_input: condition_list NEWLINE
\end{verbatim}
Note: to read `raw' input line without interpretation, you can use the
built-in function
\verb
\
raw_input()
\
or the
\verb
\
readline()
\
method
built-in function
\verb
@
raw_input()
@
or the
\verb
@
readline()
@
method
of file objects.
\obindex
{
file
}
\index
{
input!raw
}
...
...
Doc/ref6.tex
View file @
0db01a51
This diff is collapsed.
Click to expand it.
Doc/ref7.tex
View file @
0db01a51
This diff is collapsed.
Click to expand it.
Doc/ref8.tex
View file @
0db01a51
...
...
@@ -13,9 +13,9 @@ While a language specification need not prescribe how the language
interpreter is invoked, it is useful to have a notion of a complete
Python program. A complete Python program is executed in a minimally
initialized environment: all built-in and standard modules are
available, but none have been initialized, except for
\verb
\
sys
\
(various system services),
\verb
\
__builtin__
\
(built-in functions,
exceptions and
\verb
\
None
\
) and
\verb
\
__main__
\
. The latter is used
available, but none have been initialized, except for
\verb
@
sys
@
(various system services),
\verb
@
__builtin__
@
(built-in functions,
exceptions and
\verb
@
None
@
) and
\verb
@
__main__
@
. The latter is used
to provide the local and global name space for execution of the
complete program.
\bimodindex
{
sys
}
...
...
@@ -29,7 +29,7 @@ The interpreter may also be invoked in interactive mode; in this case,
it does not read and execute a complete program but reads and executes
one statement (possibly compound) at a time. The initial environment
is identical to that of a complete program; each statement is executed
in the name space of
\verb
\
__main__
\
.
in the name space of
\verb
@
__main__
@
.
\index
{
interactive mode
}
Under
{
\UNIX
}
, a complete program can be passed to the interpreter in
...
...
@@ -58,7 +58,7 @@ This syntax is used in the following situations:
\item
when parsing a module;
\item
when parsing a string passed to the
\verb
\
exec
\
statement;
\item
when parsing a string passed to the
\verb
@
exec
@
statement;
\end{itemize}
...
...
@@ -80,14 +80,14 @@ end of the input.
There are two forms of expression input. Both ignore leading
whitespace.
The string argument to
\verb
\
eval()
\
must have the following form:
The string argument to
\verb
@
eval()
@
must have the following form:
\bifuncindex
{
eval
}
\begin{verbatim}
eval
_
input: condition
_
list NEWLINE*
\end{verbatim}
The input line read by
\verb
\
input()
\
must have the following form:
The input line read by
\verb
@
input()
@
must have the following form:
\bifuncindex
{
input
}
\begin{verbatim}
...
...
@@ -95,7 +95,7 @@ input_input: condition_list NEWLINE
\end{verbatim}
Note: to read `raw' input line without interpretation, you can use the
built-in function
\verb
\
raw_input()
\
or the
\verb
\
readline()
\
method
built-in function
\verb
@
raw_input()
@
or the
\verb
@
readline()
@
method
of file objects.
\obindex
{
file
}
\index
{
input!raw
}
...
...
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