]> granicus.if.org Git - python/commitdiff
Update doc to reflect Tim's changes to bool.
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 5 Apr 2002 02:21:09 +0000 (02:21 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 5 Apr 2002 02:21:09 +0000 (02:21 +0000)
Doc/lib/libasyncore.tex
Doc/lib/libcfgparser.tex
Doc/lib/libcode.tex
Doc/lib/libfilecmp.tex
Doc/lib/libmutex.tex
Doc/lib/libposixpath.tex
Doc/lib/librobotparser.tex
Doc/lib/libtabnanny.tex

index cae972d5c2583b3a557b5bef42798175770d4eba..a85998e62f79a1c967c55b329da807236926f5e1 100644 (file)
@@ -118,14 +118,14 @@ def handle_write(self):
 \begin{methoddesc}{readable}{}
   Each time through the \method{select()} loop, the set of sockets 
   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.
 \end{methoddesc}
 
 \begin{methoddesc}{writable}{}
   Each time through the \method{select()} loop, the set of sockets 
   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.
 \end{methoddesc}
 
index ff01fdefb35a4255d47834b0209bd73e5e299f39..c50b456aa05849f5960786c99da2d3fd79e3b8b5 100644 (file)
@@ -211,7 +211,8 @@ If the option existed to be removed, return 1; otherwise return 0.
 
 \begin{methoddesc}{remove_section}{section}
 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}
 
 \begin{methoddesc}{optionxform}{option}
index ff6bde2ce7e1009aff311888400122f866aedb6d..7bde19b614e16489b656072595dc192aaae58eec 100644 (file)
@@ -80,18 +80,18 @@ The input is incorrect; \function{compile_command()} raised an
 exception (\exception{SyntaxError} or \exception{OverflowError}).  A
 syntax traceback will be printed by calling the
 \method{showsyntaxerror()} method.  \method{runsource()} returns
-\code{0}.
+\code{False}.
 
 \item
 The input is incomplete, and more input is required;
 \function{compile_command()} returned \code{None}.
-\method{runsource()} returns \code{1}.
+\method{runsource()} returns \code{True}.
 
 \item
 The input is complete; \function{compile_command()} returned a code
 object.  The code is executed by calling the \method{runcode()} (which
 also handles run-time exceptions, except for \exception{SystemExit}).
-\method{runsource()} returns \code{0}.
+\method{runsource()} returns \code{False}.
 \end{itemize}
 
 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
 of the buffer as source.  If this indicates that the command was
 executed or invalid, the buffer is reset; otherwise, the command is
 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,
-\code{0} if the line was dealt with in some way (this is the same as
+appended.  The return value is \code{True} if more input is required,
+\code{False} if the line was dealt with in some way (this is the same as
 \method{runsource()}).
 \end{methoddesc}
 
index 6e474ae9a02e9c81670fdeb4773916bd159097d0..ddb74ab1b6433de461c05ee79c406cc6a48517dd 100644 (file)
@@ -12,8 +12,8 @@ directories, with various optional time/correctness trade-offs.
 The \module{filecmp} module defines the following functions:
 
 \begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}}
-Compare the files named \var{f1} and \var{f2}, returning \code{1} if
-they seem equal, \code{0} otherwise.
+Compare the files named \var{f1} and \var{f2}, returning \code{True} if
+they seem equal, \code{False} otherwise.
 
 Unless \var{shallow} is given and is false, files with identical
 \function{os.stat()} signatures are taken to be equal.  If
@@ -51,9 +51,9 @@ Example:
 \begin{verbatim}
 >>> import filecmp
 >>> filecmp.cmp('libundoc.tex', 'libundoc.tex')
-1
+True
 >>> filecmp.cmp('libundoc.tex', 'lib.tex')
-0
+False
 \end{verbatim}
 
 
index e2c34f29cf4dc3f63fdcf11acda33506dc3e00e3..48936904e04966e320e14dc5ad6e5c5b7656599b 100644 (file)
@@ -41,7 +41,7 @@ Check whether the mutex is locked.
 
 \begin{methoddesc}{testandset}{}
 ``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}
 
 \begin{methoddesc}{lock}{function, argument}
index a59b5a7cc2cb5deda4872d9b3bab59813aa3d827..4bbb5b6e56900a33866d091624b582910c91cb0e 100644 (file)
@@ -42,7 +42,7 @@ half of the pair returned by \code{split(\var{path})}.
 \end{funcdesc}
 
 \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}
 
 \begin{funcdesc}{expanduser}{path}
@@ -88,29 +88,29 @@ Return the size, in bytes, of \var{filename}.  Raise
 \end{funcdesc}
 
 \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).
 \end{funcdesc}
 
 \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()}
 can be true for the same path.
 \end{funcdesc}
 
 \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
 be true for the same path.
 \end{funcdesc}
 
 \begin{funcdesc}{islink}{path}
-Return true if \var{path} refers to a directory entry that is a
-symbolic link.  Always false if symbolic links are not supported.
+Return \code{True} if \var{path} refers to a directory entry that is a
+symbolic link.  Always \code{False} if symbolic links are not supported.
 \end{funcdesc}
 
 \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
 function checks whether \var{path}'s parent, \file{\var{path}/..}, is
 on a different device than \var{path}, or whether \file{\var{path}/..}
@@ -149,7 +149,7 @@ Availability:  \UNIX.
 \end{funcdesc}
 
 \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).
 Raise an exception if a \function{os.stat()} call on either pathname
 fails.
@@ -157,14 +157,14 @@ Availability:  Macintosh, \UNIX.
 \end{funcdesc}
 
 \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
 descriptors.
 Availability:  Macintosh, \UNIX.
 \end{funcdesc}
 
 \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
 \function{fstat()}, \function{lstat()}, or \function{stat()}.  This
 function implements the underlying comparison used by
index 0008dde5281eacb4886744da956ef4e4babee801..8bf1ae885279535acea67ce18b10bde64e29442b 100644 (file)
@@ -35,7 +35,7 @@ Parses the lines argument.
 \end{methoddesc}
 
 \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.
 \end{methoddesc}
 
@@ -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.read()
 >>> rp.can_fetch("*", "http://www.musi-cal.com/cgi-bin/search?city=San+Francisco")
-0
+False
 >>> rp.can_fetch("*", "http://www.musi-cal.com/")
-1
+True
 \end{verbatim}
index 7985d9ea32b812b01a8caab5af9d481b85e0f160..02d4b7bdfd796e889d0053ecb2194bf4134fe9ae 100644 (file)
@@ -29,7 +29,7 @@ in future releases; such changes may not be backward compatible.}
 
 \begin{datadesc}{verbose}
   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}