mirror of
https://github.com/python/cpython.git
synced 2025-11-02 14:41:33 +00:00
Mark up filename extensions consistently.
Logical markup.
This commit is contained in:
parent
3b26eeddea
commit
7506298dfb
2 changed files with 42 additions and 42 deletions
|
|
@ -17,9 +17,9 @@ internal to external form (in an RPC buffer for instance) and
|
||||||
|
|
||||||
This is not a general ``persistency'' module. For general persistency
|
This is not a general ``persistency'' module. For general persistency
|
||||||
and transfer of Python objects through RPC calls, see the modules
|
and transfer of Python objects through RPC calls, see the modules
|
||||||
\code{pickle} and \code{shelve}. The \code{marshal} module exists
|
\module{pickle} and \module{shelve}. The \module{marshal} module exists
|
||||||
mainly to support reading and writing the ``pseudo-compiled'' code for
|
mainly to support reading and writing the ``pseudo-compiled'' code for
|
||||||
Python modules of \samp{.pyc} files.
|
Python modules of \file{.pyc} files.
|
||||||
\refstmodindex{pickle}
|
\refstmodindex{pickle}
|
||||||
\refstmodindex{shelve}
|
\refstmodindex{shelve}
|
||||||
\obindex{code}
|
\obindex{code}
|
||||||
|
|
@ -37,16 +37,16 @@ supported; and recursive lists and dictionaries should not be written
|
||||||
\strong{Caveat:} On machines where C's \code{long int} type has more than
|
\strong{Caveat:} On machines where C's \code{long int} type has more than
|
||||||
32 bits (such as the DEC Alpha), it
|
32 bits (such as the DEC Alpha), it
|
||||||
is possible to create plain Python integers that are longer than 32
|
is possible to create plain Python integers that are longer than 32
|
||||||
bits. Since the current \code{marshal} module uses 32 bits to
|
bits. Since the current \module{marshal} module uses 32 bits to
|
||||||
transfer plain Python integers, such values are silently truncated.
|
transfer plain Python integers, such values are silently truncated.
|
||||||
This particularly affects the use of very long integer literals in
|
This particularly affects the use of very long integer literals in
|
||||||
Python modules --- these will be accepted by the parser on such
|
Python modules --- these will be accepted by the parser on such
|
||||||
machines, but will be silently be truncated when the module is read
|
machines, but will be silently be truncated when the module is read
|
||||||
from the \code{.pyc} instead.%
|
from the \file{.pyc} instead.%
|
||||||
\footnote{A solution would be to refuse such literals in the parser,
|
\footnote{A solution would be to refuse such literals in the parser,
|
||||||
since they are inherently non-portable. Another solution would be to
|
since they are inherently non-portable. Another solution would be to
|
||||||
let the \code{marshal} module raise an exception when an integer value
|
let the \module{marshal} module raise an exception when an integer
|
||||||
would be truncated. At least one of these solutions will be
|
value would be truncated. At least one of these solutions will be
|
||||||
implemented in a future version.}
|
implemented in a future version.}
|
||||||
|
|
||||||
There are functions that read/write files as well as functions
|
There are functions that read/write files as well as functions
|
||||||
|
|
@ -59,34 +59,34 @@ The module defines these functions:
|
||||||
\begin{funcdesc}{dump}{value\, file}
|
\begin{funcdesc}{dump}{value\, file}
|
||||||
Write the value on the open file. The value must be a supported
|
Write the value on the open file. The value must be a supported
|
||||||
type. The file must be an open file object such as
|
type. The file must be an open file object such as
|
||||||
\code{sys.stdout} or returned by \code{open()} or
|
\code{sys.stdout} or returned by \function{open()} or
|
||||||
\code{posix.popen()}.
|
\function{posix.popen()}.
|
||||||
|
|
||||||
If the value has (or contains an object that has) an unsupported type,
|
If the value has (or contains an object that has) an unsupported type,
|
||||||
a \code{ValueError} exception is raised -- but garbage data will also
|
a \exception{ValueError} exception is raised -- but garbage data
|
||||||
be written to the file. The object will not be properly read back by
|
will also be written to the file. The object will not be properly
|
||||||
\code{load()}.
|
read back by \function{load()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{load}{file}
|
\begin{funcdesc}{load}{file}
|
||||||
Read one value from the open file and return it. If no valid value
|
Read one value from the open file and return it. If no valid value
|
||||||
is read, raise \code{EOFError}, \code{ValueError} or
|
is read, raise \exception{EOFError}, \exception{ValueError} or
|
||||||
\code{TypeError}. The file must be an open file object.
|
\exception{TypeError}. The file must be an open file object.
|
||||||
|
|
||||||
Warning: If an object containing an unsupported type was marshalled
|
Warning: If an object containing an unsupported type was marshalled
|
||||||
with \code{dump()}, \code{load()} will substitute \code{None} for the
|
with \function{dump()}, \function{load()} will substitute
|
||||||
unmarshallable type.
|
\code{None} for the unmarshallable type.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{dumps}{value}
|
\begin{funcdesc}{dumps}{value}
|
||||||
Return the string that would be written to a file by
|
Return the string that would be written to a file by
|
||||||
\code{dump(value, file)}. The value must be a supported type.
|
\code{dump(\var{value}, \var{file})}. The value must be a supported
|
||||||
Raise a \code{ValueError} exception if value has (or contains an
|
type. Raise a \exception{ValueError} exception if value has (or
|
||||||
object that has) an unsupported type.
|
contains an object that has) an unsupported type.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{loads}{string}
|
\begin{funcdesc}{loads}{string}
|
||||||
Convert the string to a value. If no valid value is found, raise
|
Convert the string to a value. If no valid value is found, raise
|
||||||
\code{EOFError}, \code{ValueError} or \code{TypeError}. Extra
|
\exception{EOFError}, \exception{ValueError} or
|
||||||
characters in the string are ignored.
|
\exception{TypeError}. Extra characters in the string are ignored.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ internal to external form (in an RPC buffer for instance) and
|
||||||
|
|
||||||
This is not a general ``persistency'' module. For general persistency
|
This is not a general ``persistency'' module. For general persistency
|
||||||
and transfer of Python objects through RPC calls, see the modules
|
and transfer of Python objects through RPC calls, see the modules
|
||||||
\code{pickle} and \code{shelve}. The \code{marshal} module exists
|
\module{pickle} and \module{shelve}. The \module{marshal} module exists
|
||||||
mainly to support reading and writing the ``pseudo-compiled'' code for
|
mainly to support reading and writing the ``pseudo-compiled'' code for
|
||||||
Python modules of \samp{.pyc} files.
|
Python modules of \file{.pyc} files.
|
||||||
\refstmodindex{pickle}
|
\refstmodindex{pickle}
|
||||||
\refstmodindex{shelve}
|
\refstmodindex{shelve}
|
||||||
\obindex{code}
|
\obindex{code}
|
||||||
|
|
@ -37,16 +37,16 @@ supported; and recursive lists and dictionaries should not be written
|
||||||
\strong{Caveat:} On machines where C's \code{long int} type has more than
|
\strong{Caveat:} On machines where C's \code{long int} type has more than
|
||||||
32 bits (such as the DEC Alpha), it
|
32 bits (such as the DEC Alpha), it
|
||||||
is possible to create plain Python integers that are longer than 32
|
is possible to create plain Python integers that are longer than 32
|
||||||
bits. Since the current \code{marshal} module uses 32 bits to
|
bits. Since the current \module{marshal} module uses 32 bits to
|
||||||
transfer plain Python integers, such values are silently truncated.
|
transfer plain Python integers, such values are silently truncated.
|
||||||
This particularly affects the use of very long integer literals in
|
This particularly affects the use of very long integer literals in
|
||||||
Python modules --- these will be accepted by the parser on such
|
Python modules --- these will be accepted by the parser on such
|
||||||
machines, but will be silently be truncated when the module is read
|
machines, but will be silently be truncated when the module is read
|
||||||
from the \code{.pyc} instead.%
|
from the \file{.pyc} instead.%
|
||||||
\footnote{A solution would be to refuse such literals in the parser,
|
\footnote{A solution would be to refuse such literals in the parser,
|
||||||
since they are inherently non-portable. Another solution would be to
|
since they are inherently non-portable. Another solution would be to
|
||||||
let the \code{marshal} module raise an exception when an integer value
|
let the \module{marshal} module raise an exception when an integer
|
||||||
would be truncated. At least one of these solutions will be
|
value would be truncated. At least one of these solutions will be
|
||||||
implemented in a future version.}
|
implemented in a future version.}
|
||||||
|
|
||||||
There are functions that read/write files as well as functions
|
There are functions that read/write files as well as functions
|
||||||
|
|
@ -59,34 +59,34 @@ The module defines these functions:
|
||||||
\begin{funcdesc}{dump}{value\, file}
|
\begin{funcdesc}{dump}{value\, file}
|
||||||
Write the value on the open file. The value must be a supported
|
Write the value on the open file. The value must be a supported
|
||||||
type. The file must be an open file object such as
|
type. The file must be an open file object such as
|
||||||
\code{sys.stdout} or returned by \code{open()} or
|
\code{sys.stdout} or returned by \function{open()} or
|
||||||
\code{posix.popen()}.
|
\function{posix.popen()}.
|
||||||
|
|
||||||
If the value has (or contains an object that has) an unsupported type,
|
If the value has (or contains an object that has) an unsupported type,
|
||||||
a \code{ValueError} exception is raised -- but garbage data will also
|
a \exception{ValueError} exception is raised -- but garbage data
|
||||||
be written to the file. The object will not be properly read back by
|
will also be written to the file. The object will not be properly
|
||||||
\code{load()}.
|
read back by \function{load()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{load}{file}
|
\begin{funcdesc}{load}{file}
|
||||||
Read one value from the open file and return it. If no valid value
|
Read one value from the open file and return it. If no valid value
|
||||||
is read, raise \code{EOFError}, \code{ValueError} or
|
is read, raise \exception{EOFError}, \exception{ValueError} or
|
||||||
\code{TypeError}. The file must be an open file object.
|
\exception{TypeError}. The file must be an open file object.
|
||||||
|
|
||||||
Warning: If an object containing an unsupported type was marshalled
|
Warning: If an object containing an unsupported type was marshalled
|
||||||
with \code{dump()}, \code{load()} will substitute \code{None} for the
|
with \function{dump()}, \function{load()} will substitute
|
||||||
unmarshallable type.
|
\code{None} for the unmarshallable type.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{dumps}{value}
|
\begin{funcdesc}{dumps}{value}
|
||||||
Return the string that would be written to a file by
|
Return the string that would be written to a file by
|
||||||
\code{dump(value, file)}. The value must be a supported type.
|
\code{dump(\var{value}, \var{file})}. The value must be a supported
|
||||||
Raise a \code{ValueError} exception if value has (or contains an
|
type. Raise a \exception{ValueError} exception if value has (or
|
||||||
object that has) an unsupported type.
|
contains an object that has) an unsupported type.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{loads}{string}
|
\begin{funcdesc}{loads}{string}
|
||||||
Convert the string to a value. If no valid value is found, raise
|
Convert the string to a value. If no valid value is found, raise
|
||||||
\code{EOFError}, \code{ValueError} or \code{TypeError}. Extra
|
\exception{EOFError}, \exception{ValueError} or
|
||||||
characters in the string are ignored.
|
\exception{TypeError}. Extra characters in the string are ignored.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue