Kaydet (Commit) e1b304db authored tarafından Fred Drake's avatar Fred Drake

Fix small typos and markup consistency nits.

üst c4422127
...@@ -65,40 +65,41 @@ tuple is stored in the cache and returned to the caller. ...@@ -65,40 +65,41 @@ tuple is stored in the cache and returned to the caller.
To simplify working with encoded files or stream, the module To simplify working with encoded files or stream, the module
also defines these utility functions: also defines these utility functions:
\begin{funcdesc}{open}{filename, mode\optional{, encoding=None\optional{, errors='strict'\optional{, buffering=1}}}} \begin{funcdesc}{open}{filename, mode\optional{, encoding\optional{,
errors\optional{, buffering}}}}
Open an encoded file using the given \var{mode} and return Open an encoded file using the given \var{mode} and return
a wrapped version providing transparent encoding/decoding. a wrapped version providing transparent encoding/decoding.
\strong{Note:} The wrapped version will only accept the object format \strong{Note:} The wrapped version will only accept the object format
defined by the codecs, i.e. Unicode objects for most builtin defined by the codecs, i.e.\ Unicode objects for most built-in
codecs. Output is also codec dependent and will usually by Unicode as codecs. Output is also codec-dependent and will usually be Unicode as
well. well.
\var{encoding} specifies the encoding which is to be used for the \var{encoding} specifies the encoding which is to be used for the
the file. the file.
\var{errors} may be given to define the error handling. It defaults \var{errors} may be given to define the error handling. It defaults
to 'strict' which causes a \exception{ValueError} to be raised in case to \code{'strict'} which causes a \exception{ValueError} to be raised
an encoding error occurs. in case an encoding error occurs.
\var{buffering} has the same meaning as for the built-in \var{buffering} has the same meaning as for the built-in
\function{open()} function. It defaults to line buffered. \function{open()} function. It defaults to line buffered.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{EncodedFile}{file, input\optional{, output=None\optional{, errors='strict'}}} \begin{funcdesc}{EncodedFile}{file, input\optional{,
output\optional{, errors}}}
Return a wrapped version of file which provides transparent Return a wrapped version of file which provides transparent
encoding translation. encoding translation.
Strings written to the wrapped file are interpreted according to the Strings written to the wrapped file are interpreted according to the
given \var{input} encoding and then written to the original file as given \var{input} encoding and then written to the original file as
string using the \var{output} encoding. The intermediate encoding will strings using the \var{output} encoding. The intermediate encoding will
usually be Unicode but depends on the specified codecs. usually be Unicode but depends on the specified codecs.
If \var{output} is not given, it defaults to input. If \var{output} is not given, it defaults to \var{input}.
\var{errors} may be given to define the error handling. It defaults to \var{errors} may be given to define the error handling. It defaults to
'strict' which causes \exception{ValueError} to be raised in case \code{'strict'}, which causes \exception{ValueError} to be raised in case
an encoding error occurs. an encoding error occurs.
\end{funcdesc} \end{funcdesc}
......
...@@ -21,7 +21,7 @@ Unix. ...@@ -21,7 +21,7 @@ Unix.
characters, regardless of your locale characters, regardless of your locale
settings.} settings.}
\seemodule{curses.textbox}{Editable text widget for curses supporting \seemodule{curses.textbox}{Editable text widget for curses supporting
Emacs-like bindings.} Emacs-like bindings.}
\seetext{Tutorial material on using curses with Python is available \seetext{Tutorial material on using curses with Python is available
on the Python Web site as Andrew Kuchling's on the Python Web site as Andrew Kuchling's
\citetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses \citetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses
...@@ -349,10 +349,10 @@ Leave echo mode. Echoing of input characters is turned off, ...@@ -349,10 +349,10 @@ Leave echo mode. Echoing of input characters is turned off,
Leave newline mode. Disable translation of return into newline on Leave newline mode. Disable translation of return into newline on
input, and disable low-level translation of newline into input, and disable low-level translation of newline into
newline/return on output (but this does not change the behavior of newline/return on output (but this does not change the behavior of
addch('\n') which always does the equivalent of return and line feed \code{addch('\e n')}, which always does the equivalent of return and
on the virtual screen). With translation off, curses can sometimes speed line feed on the virtual screen). With translation off, curses can
up vertical motion a little; also, it will be able to detect the sometimes speed up vertical motion a little; also, it will be able to
return key on input detect the return key on input.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{noqiflush}{} \begin{funcdesc}{noqiflush}{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment