\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}{}
\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}
\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
\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}
\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}
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}
\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).
\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
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
\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}
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.
\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),
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
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.
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)}.
\ttindex{setdefault()}
\ttindex{popitem()}
\ttindex{iteritems()}
- \ttindex{iterkeys)}
+ \ttindex{iterkeys()}
\ttindex{itervalues()}}
\begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
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{<module 'sys' (built-in)>}. If loaded from a file, they are
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{,
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}
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.