Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eb0f066

Browse files
committed
Correct small nits reported by Rob Hooft.
1 parent 51ca6e3 commit eb0f066

22 files changed

Lines changed: 72 additions & 66 deletions

Doc/lib/libexcs.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ \section{Built-in Exceptions}
22

33
Exceptions can be class objects or string objects. While
44
traditionally, most exceptions have been string objects, in Python
5-
1.5a4, all standard exceptions have been converted to class objects,
5+
1.5, all standard exceptions have been converted to class objects,
66
and users are encouraged to the the same. The source code for those
77
exceptions is present in the standard library module
88
\code{exceptions}; this module never needs to be imported explicitly.
@@ -20,7 +20,7 @@ \section{Built-in Exceptions}
2020
not a requirement for user-defined exceptions or exceptions defined by
2121
library modules.
2222

23-
For class exceptions, in a \code{try} statement with an\code{except}
23+
For class exceptions, in a \code{try} statement with an \code{except}
2424
clause that mentions a particular class, that clause also handles
2525
any exception classes derived from that class (but not exception
2626
classes from which \emph{it} is derived). Two exception classes

Doc/lib/libfuncs.tex

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ \section{Built-in Functions}
126126
\end{funcdesc}
127127

128128
\begin{funcdesc}{dir}{}
129-
XXX New functionality takes anything and looks in __dict__,
130-
__methods__, __members__.
131-
132129
Without arguments, return the list of names in the current local
133-
symbol table. With a module, class or class instance object as
134-
argument (or anything else that has a \code{__dict__} attribute),
135-
returns the list of names in that object's attribute dictionary.
136-
The resulting list is sorted. For example:
130+
symbol table. With an argument, attempts to return a list of valid
131+
attribute for that object. This information is gleaned from the
132+
object's \code{__dict__}, \code{__methods__} and \code{__members__}
133+
attributes, if defined. The list is not necessarily complete; e.g.,
134+
for classes, attributes defined in base classes are not included,
135+
and for class instances, methods are not included.
136+
The resulting list is sorted alphabetically. For example:
137137

138138
\bcode\begin{verbatim}
139139
>>> import sys
@@ -146,8 +146,8 @@ \section{Built-in Functions}
146146
\end{funcdesc}
147147

148148
\begin{funcdesc}{divmod}{a\, b}
149-
Take two numbers as arguments and return a pair of integers
150-
consisting of their integer quotient and remainder. With mixed
149+
Take two numbers as arguments and return a pair of numbers consisting
150+
of their quotient and remainder when using long division. With mixed
151151
operand types, the rules for binary arithmetic operators apply. For
152152
plain and long integers, the result is the same as
153153
\code{(\var{a} / \var{b}, \var{a} \%{} \var{b})}.
@@ -249,7 +249,7 @@ \section{Built-in Functions}
249249

250250
\begin{funcdesc}{hash}{object}
251251
Return the hash value of the object (if it has one). Hash values
252-
are 32-bit integers. They are used to quickly compare dictionary
252+
are integers. They are used to quickly compare dictionary
253253
keys during a dictionary lookup. Numeric values that compare equal
254254
have the same hash value (even if they are of different types, e.g.
255255
1 and 1.0).
@@ -275,8 +275,8 @@ \section{Built-in Functions}
275275

276276
\begin{funcdesc}{input}{\optional{prompt}}
277277
Almost equivalent to \code{eval(raw_input(\var{prompt}))}. Like
278-
\code{raw_input()}, the \var{prompt} argument is optional, and GNU
279-
readline is used when configured. The difference
278+
\code{raw_input()}, the \var{prompt} argument is optional, and the
279+
\code{readline} module is used when loaded. The difference
280280
is that a long input expression may be broken over multiple lines using
281281
the backslash convention.
282282
\end{funcdesc}
@@ -348,7 +348,7 @@ \section{Built-in Functions}
348348
arbitrary size, possibly embedded in whitespace;
349349
this behaves identical to \code{string.atol(\var{x})}.
350350
Otherwise, the argument may be a plain or
351-
long integer or a floating point number, and a long interger with
351+
long integer or a floating point number, and a long integer with
352352
the same value is returned. Conversion of floating
353353
point numbers to integers is defined by the C semantics;
354354
see the description of \code{int()}.
@@ -481,7 +481,7 @@ \section{Built-in Functions}
481481
>>>
482482
\end{verbatim}\ecode
483483

484-
If the interpreter was built to use the GNU readline library, then
484+
If the \code{readline} module was loaded, then
485485
\code{raw_input()} will use it to provide elaborate
486486
line editing and history features.
487487
\end{funcdesc}

Doc/lib/libgetopt.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ \section{Standard Module \sectcode{getopt}}
7575
\end{verbatim}\ecode
7676
%
7777
The exception
78-
\code{getopt.error = 'getopt.error'}
78+
\code{getopt.error}
7979
is raised when an unrecognized option is found in the argument list or
8080
when an option requiring an argument is given none.
8181
The argument to the exception is a string indicating the cause of the

Doc/lib/libgrp.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ \section{Built-in Module \sectcode{grp}}
1515
list is a list of strings.
1616
(Note that most users are not explicitly listed as members of the
1717
group they are in according to the password database.)
18-
An exception is raised if the entry asked for cannot be found.
18+
A \code{KeyError} exception is raised if the entry asked for cannot be found.
1919

2020
It defines the following items:
2121

Doc/lib/libgzip.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ \section{Built-in Module \sectcode{gzip}}
2121
The \file{gzip} file format includes the original filename of the
2222
uncompressed file; when opening a \code{GzipFile} object for
2323
writing, it can be set by the \var{filename} argument. The default
24-
value is \code{"GzippedFile"}.
24+
value is an empty string.
2525

2626
\var{mode} can be either \code{'r'} or \code{'w'} depending on
2727
whether the file will be read or written. \var{compresslevel} is an

Doc/lib/libposix.tex

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,17 @@ \section{Built-in Module \sectcode{posix}}
148148
\end{funcdesc}
149149

150150
\begin{funcdesc}{getegid}{}
151-
Return the current process's effective group id.
151+
Return the current process' effective group id.
152152
(Not on MS-DOS.)
153153
\end{funcdesc}
154154

155155
\begin{funcdesc}{geteuid}{}
156-
Return the current process's effective user id.
156+
Return the current process' effective user id.
157157
(Not on MS-DOS.)
158158
\end{funcdesc}
159159

160160
\begin{funcdesc}{getgid}{}
161-
Return the current process's group id.
161+
Return the current process' group id.
162162
(Not on MS-DOS.)
163163
\end{funcdesc}
164164

@@ -178,7 +178,7 @@ \section{Built-in Module \sectcode{posix}}
178178
\end{funcdesc}
179179

180180
\begin{funcdesc}{getuid}{}
181-
Return the current process's user id.
181+
Return the current process' user id.
182182
(Not on MS-DOS.)
183183
\end{funcdesc}
184184

@@ -326,7 +326,7 @@ \section{Built-in Module \sectcode{posix}}
326326
\end{funcdesc}
327327

328328
\begin{funcdesc}{setgid}{gid}
329-
Set the current process's group id.
329+
Set the current process' group id.
330330
(Not on MS-DOS.)
331331
\end{funcdesc}
332332

@@ -350,7 +350,7 @@ \section{Built-in Module \sectcode{posix}}
350350
\end{funcdesc}
351351

352352
\begin{funcdesc}{setuid}{uid}
353-
Set the current process's user id.
353+
Set the current process' user id.
354354
(Not on MS-DOS.)
355355
\end{funcdesc}
356356

@@ -424,8 +424,9 @@ \section{Built-in Module \sectcode{posix}}
424424
\code{(\var{sysname}, \var{nodename}, \var{release}, \var{version}, \var{machine})}.
425425
Some systems truncate the nodename to 8
426426
characters or to the leading component; a better way to get the
427-
hostname is \code{socket.gethostname()}. (Not on MS-DOS, nor on older
428-
\UNIX{} systems.)
427+
hostname is \code{socket.gethostname()} or even
428+
\code{socket.gethostbyaddr(socket.gethostname())}.
429+
(Not on MS-DOS, nor on older \UNIX{} systems.)
429430
\end{funcdesc}
430431

431432
\begin{funcdesc}{unlink}{path}

Doc/lib/libpwd.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ \section{Built-in Module \sectcode{pwd}}
1515
\code{pw_dir},
1616
\code{pw_shell}.
1717
The uid and gid items are integers, all others are strings.
18-
An exception is raised if the entry asked for cannot be found.
18+
A \code{KeyError} exception is raised if the entry asked for cannot be found.
1919

2020
It defines the following items:
2121

Doc/lib/libre.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ \subsection{Regular Expression Syntax}
133133
%
134134
\item[\code{|}]\code{A|B}, where A and B can be arbitrary REs,
135135
creates a regular expression that will match either A or B. This can
136-
be used inside groups (see below) as well. To match a literal '|',
136+
be used inside groups (see below) as well. To match a literal '\code{|}',
137137
use \code{\e|}, or enclose it inside a character class, like \code{[|]}.
138138
%
139139
\item[\code{(...)}] Matches whatever regular expression is inside the

Doc/lib/libregex.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ \section{Built-in Module \sectcode{regex}}
3737
\emph{quadruple} it or enclose it in a singleton character class.
3838
E.g.\ to extract \LaTeX\ \samp{\e section\{{\rm
3939
\ldots}\}} headers from a document, you can use this pattern:
40-
\code{'[\e ] section\{\e (.*\e )\}'}. \emph{Another exception:}
40+
\code{'[\e ]section\{\e (.*\e )\}'}. \emph{Another exception:}
4141
the escape sequece \samp{\e b} is significant in string literals
4242
(where it means the ASCII bell character) as well as in Emacs regular
4343
expressions (where it stands for a word boundary), so in order to
@@ -125,7 +125,7 @@ \subsection{Regular Expressions}
125125
from the list below. If the ordinary character is not on the list,
126126
then the resulting RE will match the second character. For example,
127127
\code{\e\$} matches the character '\$'. Ones where the backslash
128-
should be doubled are indicated.
128+
should be doubled in string literals are indicated.
129129

130130
\begin{itemize}
131131
\item[\code{\e|}]\code{A\e|B}, where A and B can be arbitrary REs,

Doc/lib/libtypes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ \subsubsection{File Objects}
729729

730730
\begin{funcdesc}{readlines}{\optional{sizehint}}
731731
Read until \EOF{} using \code{readline()} and return a list containing
732-
the lines thus read. If the optional \var{bufferhint} argument is
732+
the lines thus read. If the optional \var{sizehint} argument is
733733
present, instead of reading up to \EOF{}, whole lines totalling
734734
approximately \var{sizehint} bytes are read.
735735
\end{funcdesc}

0 commit comments

Comments
 (0)