From: Raymond Hettinger Date: Fri, 16 May 2003 03:08:36 +0000 (+0000) Subject: Fix nits found by Tools\scripts\texcheck.py X-Git-Tag: v2.2.3c1~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ceb58a7dd101e9dacca848c42f80cc344c647fe3;p=thirdparty%2FPython%2Fcpython.git Fix nits found by Tools\scripts\texcheck.py --- diff --git a/Doc/lib/libal.tex b/Doc/lib/libal.tex index 7159d6fb6964..90fe1c6ba640 100644 --- a/Doc/lib/libal.tex +++ b/Doc/lib/libal.tex @@ -62,7 +62,7 @@ list such as returned by \function{queryparams()}. \subsection{Configuration Objects \label{al-config-objects}} -Configuration objects (returned by \function{newconfig()} have the +Configuration objects (returned by \function{newconfig()}) have the following methods: \begin{methoddesc}[audio configuration]{getqueuesize}{} diff --git a/Doc/lib/libarray.tex b/Doc/lib/libarray.tex index b31229f41dab..1cea4f5db653 100644 --- a/Doc/lib/libarray.tex +++ b/Doc/lib/libarray.tex @@ -213,5 +213,5 @@ array('d', [1.0, 2.0, 3.14]) \url{http://numpy.sourceforge.net/} for further information about Numerical Python. (A PDF version of the NumPy manual is available at - \url{http://numpy.sourceforge.net/numdoc/numdoc.pdf}.} + \url{http://numpy.sourceforge.net/numdoc/numdoc.pdf}.)} \end{seealso} diff --git a/Doc/lib/libcurses.tex b/Doc/lib/libcurses.tex index 4c2935a9ecee..65e631e8ac83 100644 --- a/Doc/lib/libcurses.tex +++ b/Doc/lib/libcurses.tex @@ -996,7 +996,7 @@ the window. \begin{methoddesc}[window]{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If -\var{delay} is negative, blocking read is used, which will wait +\var{delay} is negative, blocking read is used (which will wait indefinitely for input). If \var{delay} is zero, then non-blocking read is used, and -1 will be returned by \method{getch()} if no input is waiting. If \var{delay} is positive, then \method{getch()} will diff --git a/Doc/lib/libdis.tex b/Doc/lib/libdis.tex index 16b692d75691..a35ae8260e6e 100644 --- a/Doc/lib/libdis.tex +++ b/Doc/lib/libdis.tex @@ -511,7 +511,7 @@ ignored and set to zero by the compiler. \end{opcodedesc} \begin{opcodedesc}{LOAD_ATTR}{namei} -Replaces TOS with \code{getattr(TOS, co_names[\var{namei}]}. +Replaces TOS with \code{getattr(TOS, co_names[\var{namei}])}. \end{opcodedesc} \begin{opcodedesc}{COMPARE_OP}{opname} diff --git a/Doc/lib/libexcs.tex b/Doc/lib/libexcs.tex index 2ca631fbd8a7..88b7b5090ebc 100644 --- a/Doc/lib/libexcs.tex +++ b/Doc/lib/libexcs.tex @@ -188,7 +188,7 @@ Raised when an \keyword{assert} statement fails. \kbd{Control-C} or \kbd{Delete}). During execution, a check for interrupts is made regularly. % XXXJH xrefs here - Interrupts typed when a built-in function \function{input()} or + Interrupts typed when a built-in function (\function{input()} or \function{raw_input()}) is waiting for input also raise this exception. \end{excdesc} diff --git a/Doc/lib/libftplib.tex b/Doc/lib/libftplib.tex index 0d0d7008420b..3e818837a191 100644 --- a/Doc/lib/libftplib.tex +++ b/Doc/lib/libftplib.tex @@ -164,7 +164,7 @@ same thing as in the \method{transfercmd()} method. Retrieve a file or directory listing in \ASCII{} transfer mode. \var{command} should be an appropriate \samp{RETR} command (see \method{retrbinary()} or a \samp{LIST} command (usually just the string -\code{'LIST'}). The \var{callback} function is called for each line, +\code{'LIST'})). The \var{callback} function is called for each line, with the trailing CRLF stripped. The default \var{callback} prints the line to \code{sys.stdout}. \end{methoddesc} @@ -284,7 +284,7 @@ calls (see below). \begin{methoddesc}{close}{} Close the connection unilaterally. This should not be applied to an already closed connection (such as after a successful call to -\method{quit()}. After this call the \class{FTP} instance should not +\method{quit()}). After this call the \class{FTP} instance should not be used any more (after a call to \method{close()} or \method{quit()} you cannot reopen the connection by issuing another \method{login()} method). diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 7d7a0da26d79..22354ae2f550 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -673,7 +673,7 @@ class C: \begin{funcdesc}{property}{\optional{fget\optional{, fset\optional{, fdel\optional{, doc}}}}} Return a property attribute for new-style classes (classes that - derive from \function{object}. + derive from \function{object}). \var{fget} is a function for getting an attribute value, likewise \var{fset} is a function for setting, and \var{fdel} a function diff --git a/Doc/lib/liblocale.tex b/Doc/lib/liblocale.tex index c9070719d7cb..9e6d617978cb 100644 --- a/Doc/lib/liblocale.tex +++ b/Doc/lib/liblocale.tex @@ -412,8 +412,8 @@ threads that happen to run before the settings have been restored. If, when coding a module for general use, you need a locale independent version of an operation that is affected by the locale -(e.g. \function{string.lower()}, or certain formats used with -\function{time.strftime()})), you will have to find a way to do it +(such as \function{string.lower()}, or certain formats used with +\function{time.strftime()}), you will have to find a way to do it without using the standard library routine. Even better is convincing yourself that using locale settings is okay. Only as a last resort should you document that your module is not compatible with diff --git a/Doc/lib/libmimetools.tex b/Doc/lib/libmimetools.tex index 7f83659eaf8d..3a6a18326d93 100644 --- a/Doc/lib/libmimetools.tex +++ b/Doc/lib/libmimetools.tex @@ -85,7 +85,7 @@ This is a list of strings. For parameters of the form \begin{methoddesc}{getparam}{name} Return the \var{value} of the first parameter (as returned by -\method{getplist()} of the form \samp{\var{name}=\var{value}} for the +\method{getplist()}) of the form \samp{\var{name}=\var{value}} for the given \var{name}. If \var{value} is surrounded by quotes of the form `\code{<}...\code{>}' or `\code{"}...\code{"}', these are removed. \end{methoddesc} diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex index 7a6383f2a5dd..f271a9c5bc68 100644 --- a/Doc/lib/libos.tex +++ b/Doc/lib/libos.tex @@ -438,7 +438,7 @@ this calls the native \cfunction{fsync()} function; on Windows, the MS \cfunction{_commit()} function. If you're starting with a Python file object \var{f}, first do -\code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno()}, +\code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno())}, to ensure that all internal buffers associated with \var{f} are written to disk. Availability: \UNIX, and Windows starting in 2.2.3. @@ -787,7 +787,7 @@ the \ctype{stat} structure, namely: \member{st_mode} (protection bits), \member{st_ino} (inode number), \member{st_dev} (device), -\member{st_nlink} (number of hard links, +\member{st_nlink} (number of hard links), \member{st_uid} (user ID of owner), \member{st_gid} (group ID of owner), \member{st_size} (size of file, in bytes), diff --git a/Doc/lib/libprofile.tex b/Doc/lib/libprofile.tex index 7adb2b8de5d1..70abcb5f351d 100644 --- a/Doc/lib/libprofile.tex +++ b/Doc/lib/libprofile.tex @@ -455,7 +455,7 @@ in the \function{profile.run()} definition. The order of the printing is based on the last \method{sort_stats()} operation done on the object (subject to caveats in \method{add()} and -\method{strip_dirs()}. +\method{strip_dirs()}). The arguments provided (if any) can be used to limit the list down to the significant entries. Initially, the list is taken to be the diff --git a/Doc/lib/librandom.tex b/Doc/lib/librandom.tex index 846b931008c0..40e019afd944 100644 --- a/Doc/lib/librandom.tex +++ b/Doc/lib/librandom.tex @@ -76,7 +76,7 @@ That creates 10 distinct generators, which can be passed out to 10 distinct threads. The generators don't share state so can be called safely in parallel. So long as no thread calls its \code{g.random()} more than a million times (the second argument to -\function{create_generators()}, the sequences seen by each thread will +\function{create_generators()}), the sequences seen by each thread will not overlap. The period of the underlying Wichmann-Hill generator limits how far this technique can be pushed. diff --git a/Doc/lib/librepr.tex b/Doc/lib/librepr.tex index 8dfd0b445515..b3d13068147c 100644 --- a/Doc/lib/librepr.tex +++ b/Doc/lib/librepr.tex @@ -96,7 +96,7 @@ and methods which format specific object types. Formatting methods for specific types are implemented as methods with a name based on the type name. In the method name, \var{type} is replaced by - \code{string.join(string.split(type(\var{obj}).__name__, '_')}. + \code{string.join(string.split(type(\var{obj}).__name__), '_')}. Dispatch to these methods is handled by \method{repr1()}. Type-specific methods which need to recursively format a value should call \samp{self.repr1(\var{subobj}, \var{level} - 1)}. diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 13a52ee2838f..4eddd74b50ea 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1044,7 +1044,7 @@ arbitrary objects): \ttindex{setdefault()} \ttindex{popitem()} \ttindex{iteritems()} - \ttindex{iterkeys)} + \ttindex{iterkeys()} \ttindex{itervalues()}} \begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes} @@ -1345,7 +1345,7 @@ Modifying this dictionary will actually change the module's symbol table, but direct assignment to the \member{__dict__} attribute is not possible (you can write \code{\var{m}.__dict__['a'] = 1}, which defines \code{\var{m}.a} to be \code{1}, but you can't write -\code{\var{m}.__dict__ = \{\}}. +\code{\var{m}.__dict__ = \{\}}). Modules built into the interpreter are written like this: \code{}. If loaded from a file, they are diff --git a/Doc/lib/liburllib2.tex b/Doc/lib/liburllib2.tex index 7b47f9b0a250..48afc9be4c35 100644 --- a/Doc/lib/liburllib2.tex +++ b/Doc/lib/liburllib2.tex @@ -297,7 +297,7 @@ Open the given \var{url} (which can be a request object or a string), optionally passing the given \var{data}. Arguments, return values and exceptions raised are the same as those of \function{urlopen()} (which simply calls the \method{open()} method -on the default installed \class{OpenerDirector}. +on the default installed \class{OpenerDirector}). \end{methoddesc} \begin{methoddesc}[OpenerDirector]{error}{proto\optional{, diff --git a/Doc/lib/libwinreg.tex b/Doc/lib/libwinreg.tex index 1fdc6cc8d51c..49b94f387055 100644 --- a/Doc/lib/libwinreg.tex +++ b/Doc/lib/libwinreg.tex @@ -25,9 +25,9 @@ This module offers the following functions: Closes a previously opened registry key. The hkey argument specifies a previously opened key. - Note that if \var{hkey} is not closed using this method, (or the - \method{handle.Close()} closed when the \var{hkey} object is - destroyed by Python. + Note that if \var{hkey} is not closed using this method or the + \method{handle.Close()} method, it is closed when the \var{hkey} object + is destroyed by Python. \end{funcdesc} @@ -387,8 +387,8 @@ This module offers the following functions: objects will compare true if they both reference the same underlying Windows handle value. - Handle objects can be converted to an integer (eg, using the - builtin \function{int()} function, in which case the underlying + Handle objects can be converted to an integer (perhaps using the + builtin \function{int()} function), in which case the underlying Windows handle value is returned. You can also use the \method{Detach()} method to return the integer handle, and also disconnect the Windows handle from the handle object.