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
d3dab2b1
Commit
d3dab2b1
authored
Apr 05, 2002
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update doc to reflect Tim's changes to bool.
parent
c334df57
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
27 deletions
+28
-27
Doc/lib/libasyncore.tex
Doc/lib/libasyncore.tex
+2
-2
Doc/lib/libcfgparser.tex
Doc/lib/libcfgparser.tex
+2
-1
Doc/lib/libcode.tex
Doc/lib/libcode.tex
+5
-5
Doc/lib/libfilecmp.tex
Doc/lib/libfilecmp.tex
+4
-4
Doc/lib/libmutex.tex
Doc/lib/libmutex.tex
+1
-1
Doc/lib/libposixpath.tex
Doc/lib/libposixpath.tex
+10
-10
Doc/lib/librobotparser.tex
Doc/lib/librobotparser.tex
+3
-3
Doc/lib/libtabnanny.tex
Doc/lib/libtabnanny.tex
+1
-1
No files found.
Doc/lib/libasyncore.tex
View file @
d3dab2b1
...
@@ -118,14 +118,14 @@ def handle_write(self):
...
@@ -118,14 +118,14 @@ def handle_write(self):
\begin{methoddesc}
{
readable
}{}
\begin{methoddesc}
{
readable
}{}
Each time through the
\method
{
select()
}
loop, the set of sockets
Each time through the
\method
{
select()
}
loop, the set of sockets
is scanned, and this method is called to see if there is any
is scanned, and this method is called to see if there is any
interest in reading. The default method simply returns
\code
{
1
}
,
interest in reading. The default method simply returns
\code
{
True
}
,
indicating that by default, all channels will be interested.
indicating that by default, all channels will be interested.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
writable
}{}
\begin{methoddesc}
{
writable
}{}
Each time through the
\method
{
select()
}
loop, the set of sockets
Each time through the
\method
{
select()
}
loop, the set of sockets
is scanned, and this method is called to see if there is any
is scanned, and this method is called to see if there is any
interest in writing. The default method simply returns
\code
{
1
}
,
interest in writing. The default method simply returns
\code
{
True
}
,
indicating that by default, all channels will be interested.
indicating that by default, all channels will be interested.
\end{methoddesc}
\end{methoddesc}
...
...
Doc/lib/libcfgparser.tex
View file @
d3dab2b1
...
@@ -211,7 +211,8 @@ If the option existed to be removed, return 1; otherwise return 0.
...
@@ -211,7 +211,8 @@ If the option existed to be removed, return 1; otherwise return 0.
\begin{methoddesc}
{
remove
_
section
}{
section
}
\begin{methoddesc}
{
remove
_
section
}{
section
}
Remove the specified
\var
{
section
}
from the configuration.
Remove the specified
\var
{
section
}
from the configuration.
If the section in fact existed, return 1. Otherwise return 0.
If the section in fact existed, return
\code
{
True
}
.
Otherwise return
\code
{
False
}
.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
optionxform
}{
option
}
\begin{methoddesc}
{
optionxform
}{
option
}
...
...
Doc/lib/libcode.tex
View file @
d3dab2b1
...
@@ -80,18 +80,18 @@ The input is incorrect; \function{compile_command()} raised an
...
@@ -80,18 +80,18 @@ The input is incorrect; \function{compile_command()} raised an
exception (
\exception
{
SyntaxError
}
or
\exception
{
OverflowError
}
). A
exception (
\exception
{
SyntaxError
}
or
\exception
{
OverflowError
}
). A
syntax traceback will be printed by calling the
syntax traceback will be printed by calling the
\method
{
showsyntaxerror()
}
method.
\method
{
runsource()
}
returns
\method
{
showsyntaxerror()
}
method.
\method
{
runsource()
}
returns
\code
{
0
}
.
\code
{
False
}
.
\item
\item
The input is incomplete, and more input is required;
The input is incomplete, and more input is required;
\function
{
compile
_
command()
}
returned
\code
{
None
}
.
\function
{
compile
_
command()
}
returned
\code
{
None
}
.
\method
{
runsource()
}
returns
\code
{
1
}
.
\method
{
runsource()
}
returns
\code
{
True
}
.
\item
\item
The input is complete;
\function
{
compile
_
command()
}
returned a code
The input is complete;
\function
{
compile
_
command()
}
returned a code
object. The code is executed by calling the
\method
{
runcode()
}
(which
object. The code is executed by calling the
\method
{
runcode()
}
(which
also handles run-time exceptions, except for
\exception
{
SystemExit
}
).
also handles run-time exceptions, except for
\exception
{
SystemExit
}
).
\method
{
runsource()
}
returns
\code
{
0
}
.
\method
{
runsource()
}
returns
\code
{
False
}
.
\end{itemize}
\end{itemize}
The return value can be used to decide whether to use
The return value can be used to decide whether to use
...
@@ -155,8 +155,8 @@ newlines. The line is appended to a buffer and the interpreter's
...
@@ -155,8 +155,8 @@ newlines. The line is appended to a buffer and the interpreter's
of the buffer as source. If this indicates that the command was
of the buffer as source. If this indicates that the command was
executed or invalid, the buffer is reset; otherwise, the command is
executed or invalid, the buffer is reset; otherwise, the command is
incomplete, and the buffer is left as it was after the line was
incomplete, and the buffer is left as it was after the line was
appended. The return value is
\code
{
1
}
if more input is required,
appended. The return value is
\code
{
True
}
if more input is required,
\code
{
0
}
if the line was dealt with in some way (this is the same as
\code
{
False
}
if the line was dealt with in some way (this is the same as
\method
{
runsource()
}
).
\method
{
runsource()
}
).
\end{methoddesc}
\end{methoddesc}
...
...
Doc/lib/libfilecmp.tex
View file @
d3dab2b1
...
@@ -12,8 +12,8 @@ directories, with various optional time/correctness trade-offs.
...
@@ -12,8 +12,8 @@ directories, with various optional time/correctness trade-offs.
The
\module
{
filecmp
}
module defines the following functions:
The
\module
{
filecmp
}
module defines the following functions:
\begin{funcdesc}
{
cmp
}{
f1, f2
\optional
{
, shallow
\optional
{
, use
_
statcache
}}}
\begin{funcdesc}
{
cmp
}{
f1, f2
\optional
{
, shallow
\optional
{
, use
_
statcache
}}}
Compare the files named
\var
{
f1
}
and
\var
{
f2
}
, returning
\code
{
1
}
if
Compare the files named
\var
{
f1
}
and
\var
{
f2
}
, returning
\code
{
True
}
if
they seem equal,
\code
{
0
}
otherwise.
they seem equal,
\code
{
False
}
otherwise.
Unless
\var
{
shallow
}
is given and is false, files with identical
Unless
\var
{
shallow
}
is given and is false, files with identical
\function
{
os.stat()
}
signatures are taken to be equal. If
\function
{
os.stat()
}
signatures are taken to be equal. If
...
@@ -51,9 +51,9 @@ Example:
...
@@ -51,9 +51,9 @@ Example:
\begin{verbatim}
\begin{verbatim}
>>> import filecmp
>>> import filecmp
>>> filecmp.cmp('libundoc.tex', 'libundoc.tex')
>>> filecmp.cmp('libundoc.tex', 'libundoc.tex')
1
True
>>> filecmp.cmp('libundoc.tex', 'lib.tex')
>>> filecmp.cmp('libundoc.tex', 'lib.tex')
0
False
\end{verbatim}
\end{verbatim}
...
...
Doc/lib/libmutex.tex
View file @
d3dab2b1
...
@@ -41,7 +41,7 @@ Check whether the mutex is locked.
...
@@ -41,7 +41,7 @@ Check whether the mutex is locked.
\begin{methoddesc}
{
testandset
}{}
\begin{methoddesc}
{
testandset
}{}
``Atomic'' test-and-set, grab the lock if it is not set,
``Atomic'' test-and-set, grab the lock if it is not set,
and return
true, otherwise, return false
.
and return
\code
{
True
}
, otherwise, return
\code
{
False
}
.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
lock
}{
function, argument
}
\begin{methoddesc}
{
lock
}{
function, argument
}
...
...
Doc/lib/libposixpath.tex
View file @
d3dab2b1
...
@@ -42,7 +42,7 @@ half of the pair returned by \code{split(\var{path})}.
...
@@ -42,7 +42,7 @@ half of the pair returned by \code{split(\var{path})}.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
exists
}{
path
}
\begin{funcdesc}
{
exists
}{
path
}
Return
true
if
\var
{
path
}
refers to an existing path.
Return
\code
{
True
}
if
\var
{
path
}
refers to an existing path.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
expanduser
}{
path
}
\begin{funcdesc}
{
expanduser
}{
path
}
...
@@ -88,29 +88,29 @@ Return the size, in bytes, of \var{filename}. Raise
...
@@ -88,29 +88,29 @@ Return the size, in bytes, of \var{filename}. Raise
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
isabs
}{
path
}
\begin{funcdesc}
{
isabs
}{
path
}
Return
true
if
\var
{
path
}
is an absolute pathname (begins with a
Return
\code
{
True
}
if
\var
{
path
}
is an absolute pathname (begins with a
slash).
slash).
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
isfile
}{
path
}
\begin{funcdesc}
{
isfile
}{
path
}
Return
true
if
\var
{
path
}
is an existing regular file. This follows
Return
\code
{
True
}
if
\var
{
path
}
is an existing regular file. This follows
symbolic links, so both
\function
{
islink()
}
and
\function
{
isfile()
}
symbolic links, so both
\function
{
islink()
}
and
\function
{
isfile()
}
can be true for the same path.
can be true for the same path.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
isdir
}{
path
}
\begin{funcdesc}
{
isdir
}{
path
}
Return
true
if
\var
{
path
}
is an existing directory. This follows
Return
\code
{
True
}
if
\var
{
path
}
is an existing directory. This follows
symbolic links, so both
\function
{
islink()
}
and
\function
{
isdir()
}
can
symbolic links, so both
\function
{
islink()
}
and
\function
{
isdir()
}
can
be true for the same path.
be true for the same path.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
islink
}{
path
}
\begin{funcdesc}
{
islink
}{
path
}
Return
true
if
\var
{
path
}
refers to a directory entry that is a
Return
\code
{
True
}
if
\var
{
path
}
refers to a directory entry that is a
symbolic link. Always
false
if symbolic links are not supported.
symbolic link. Always
\code
{
False
}
if symbolic links are not supported.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
ismount
}{
path
}
\begin{funcdesc}
{
ismount
}{
path
}
Return
true
if pathname
\var
{
path
}
is a
\dfn
{
mount point
}
: a point in
Return
\code
{
True
}
if pathname
\var
{
path
}
is a
\dfn
{
mount point
}
: a point in
a file system where a different file system has been mounted. The
a file system where a different file system has been mounted. The
function checks whether
\var
{
path
}
's parent,
\file
{
\var
{
path
}
/..
}
, is
function checks whether
\var
{
path
}
's parent,
\file
{
\var
{
path
}
/..
}
, is
on a different device than
\var
{
path
}
, or whether
\file
{
\var
{
path
}
/..
}
on a different device than
\var
{
path
}
, or whether
\file
{
\var
{
path
}
/..
}
...
@@ -149,7 +149,7 @@ Availability: \UNIX.
...
@@ -149,7 +149,7 @@ Availability: \UNIX.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
samefile
}{
path1, path2
}
\begin{funcdesc}
{
samefile
}{
path1, path2
}
Return
true
if both pathname arguments refer to the same file or
Return
\code
{
True
}
if both pathname arguments refer to the same file or
directory (as indicated by device number and i-node number).
directory (as indicated by device number and i-node number).
Raise an exception if a
\function
{
os.stat()
}
call on either pathname
Raise an exception if a
\function
{
os.stat()
}
call on either pathname
fails.
fails.
...
@@ -157,14 +157,14 @@ Availability: Macintosh, \UNIX.
...
@@ -157,14 +157,14 @@ Availability: Macintosh, \UNIX.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
sameopenfile
}{
fp1, fp2
}
\begin{funcdesc}
{
sameopenfile
}{
fp1, fp2
}
Return
true
if the file objects
\var
{
fp1
}
and
\var
{
fp2
}
refer to the
Return
\code
{
True
}
if the file objects
\var
{
fp1
}
and
\var
{
fp2
}
refer to the
same file. The two file objects may represent different file
same file. The two file objects may represent different file
descriptors.
descriptors.
Availability: Macintosh,
\UNIX
.
Availability: Macintosh,
\UNIX
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
samestat
}{
stat1, stat2
}
\begin{funcdesc}
{
samestat
}{
stat1, stat2
}
Return
true
if the stat tuples
\var
{
stat1
}
and
\var
{
stat2
}
refer to
Return
\code
{
True
}
if the stat tuples
\var
{
stat1
}
and
\var
{
stat2
}
refer to
the same file. These structures may have been returned by
the same file. These structures may have been returned by
\function
{
fstat()
}
,
\function
{
lstat()
}
, or
\function
{
stat()
}
. This
\function
{
fstat()
}
,
\function
{
lstat()
}
, or
\function
{
stat()
}
. This
function implements the underlying comparison used by
function implements the underlying comparison used by
...
...
Doc/lib/librobotparser.tex
View file @
d3dab2b1
...
@@ -35,7 +35,7 @@ Parses the lines argument.
...
@@ -35,7 +35,7 @@ Parses the lines argument.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
can
_
fetch
}{
useragent, url
}
\begin{methoddesc}
{
can
_
fetch
}{
useragent, url
}
Returns
true
if the
\var
{
useragent
}
is allowed to fetch the
\var
{
url
}
Returns
\code
{
True
}
if the
\var
{
useragent
}
is allowed to fetch the
\var
{
url
}
according to the rules contained in the parsed
\file
{
robots.txt
}
file.
according to the rules contained in the parsed
\file
{
robots.txt
}
file.
\end{methoddesc}
\end{methoddesc}
...
@@ -60,7 +60,7 @@ The following example demonstrates basic use of the RobotFileParser class.
...
@@ -60,7 +60,7 @@ The following example demonstrates basic use of the RobotFileParser class.
>>> rp.set
_
url("http://www.musi-cal.com/robots.txt")
>>> rp.set
_
url("http://www.musi-cal.com/robots.txt")
>>> rp.read()
>>> rp.read()
>>> rp.can
_
fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco")
>>> rp.can
_
fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco")
0
False
>>> rp.can
_
fetch("*", "http://www.musi-cal.com/")
>>> rp.can
_
fetch("*", "http://www.musi-cal.com/")
1
True
\end{verbatim}
\end{verbatim}
Doc/lib/libtabnanny.tex
View file @
d3dab2b1
...
@@ -29,7 +29,7 @@ in future releases; such changes may not be backward compatible.}
...
@@ -29,7 +29,7 @@ in future releases; such changes may not be backward compatible.}
\begin{datadesc}
{
verbose
}
\begin{datadesc}
{
verbose
}
Flag indicating whether to print verbose messages.
Flag indicating whether to print verbose messages.
This is
set to true
by the
\code
{
-v
}
option if called as a script.
This is
incremented
by the
\code
{
-v
}
option if called as a script.
\end{datadesc}
\end{datadesc}
...
...
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