mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
fix markup buglets
This commit is contained in:
parent
f5c87c4d99
commit
614438ab06
1 changed files with 13 additions and 22 deletions
|
|
@ -28,11 +28,9 @@ arguments for clarity.
|
||||||
|
|
||||||
The module defines the following user-callable functions:
|
The module defines the following user-callable functions:
|
||||||
|
|
||||||
\begin{funcdesc}{TemporaryFile}{\optional{mode='w+b'}
|
\begin{funcdesc}{TemporaryFile}{\optional{mode=\code{'w+b'}\optional{,
|
||||||
\optional{, bufsize=-1}
|
bufsize=\code{-1}\optional{,
|
||||||
\optional{, suffix}
|
suffix\optional{, prefix\optional{, dir}}}}}}
|
||||||
\optional{, prefix}
|
|
||||||
\optional{, dir}}
|
|
||||||
Return a file (or file-like) object that can be used as a temporary
|
Return a file (or file-like) object that can be used as a temporary
|
||||||
storage area. The file is created using \function{mkstemp}. It will
|
storage area. The file is created using \function{mkstemp}. It will
|
||||||
be destroyed as soon as it is closed (including an implicit close when
|
be destroyed as soon as it is closed (including an implicit close when
|
||||||
|
|
@ -52,11 +50,10 @@ The \var{dir}, \var{prefix} and \var{suffix} parameters are passed to
|
||||||
\function{mkstemp()}.
|
\function{mkstemp()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{NamedTemporaryFile}{\optional{mode='w+b'}
|
\begin{funcdesc}{NamedTemporaryFile}{\optional{mode=\code{'w+b'}\optional{,
|
||||||
\optional{, bufsize=-1}
|
bufsize=\code{-1}\optional{,
|
||||||
\optional{, suffix}
|
suffix\optional{, prefix\optional{,
|
||||||
\optional{, prefix}
|
dir}}}}}}
|
||||||
\optional{, dir}}
|
|
||||||
This function operates exactly as \function{TemporaryFile()} does,
|
This function operates exactly as \function{TemporaryFile()} does,
|
||||||
except that the file is guaranteed to have a visible name in the file
|
except that the file is guaranteed to have a visible name in the file
|
||||||
system (on \UNIX, the directory entry is not unlinked). That name can
|
system (on \UNIX, the directory entry is not unlinked). That name can
|
||||||
|
|
@ -67,10 +64,8 @@ be so used on \UNIX; it cannot on Windows NT or later).
|
||||||
\versionadded{2.3}
|
\versionadded{2.3}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{mkstemp}{\optional{suffix}
|
\begin{funcdesc}{mkstemp}{\optional{suffix\optional{,
|
||||||
\optional{, prefix}
|
prefix\optional{, dir\optional{, text}}}}}
|
||||||
\optional{, dir}
|
|
||||||
\optional{, text=False}}
|
|
||||||
Creates a temporary file in the most secure manner possible. There
|
Creates a temporary file in the most secure manner possible. There
|
||||||
are no race conditions in the file's creation, assuming that the
|
are no race conditions in the file's creation, assuming that the
|
||||||
platform properly implements the \constant{O_EXCL} flag for
|
platform properly implements the \constant{O_EXCL} flag for
|
||||||
|
|
@ -103,9 +98,7 @@ absolute pathname of that file, in that order.
|
||||||
\versionadded{2.3}
|
\versionadded{2.3}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{mkdtemp}{\optional{suffix}
|
\begin{funcdesc}{mkdtemp}{\optional{suffix\optional{, prefix\optional{, dir}}}}
|
||||||
\optional{, prefix}
|
|
||||||
\optional{, dir}}
|
|
||||||
Creates a temporary directory in the most secure manner possible.
|
Creates a temporary directory in the most secure manner possible.
|
||||||
There are no race conditions in the directory's creation. The
|
There are no race conditions in the directory's creation. The
|
||||||
directory is readable, writable, and searchable only by the
|
directory is readable, writable, and searchable only by the
|
||||||
|
|
@ -121,9 +114,7 @@ as for \function{mkstemp()}.
|
||||||
\versionadded{2.3}
|
\versionadded{2.3}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{mktemp}{\optional{suffix}
|
\begin{funcdesc}{mktemp}{\optional{suffix\optional{, prefix\optional{, dir}}}}
|
||||||
\optional{, prefix}
|
|
||||||
\optional{, dir}}
|
|
||||||
\deprecated{2.3}{Use \function{mkstemp()} instead.}
|
\deprecated{2.3}{Use \function{mkstemp()} instead.}
|
||||||
Return an absolute pathname of a file that did not exist at the time
|
Return an absolute pathname of a file that did not exist at the time
|
||||||
the call is made. The \var{prefix}, \var{suffix}, and \var{dir}
|
the call is made. The \var{prefix}, \var{suffix}, and \var{dir}
|
||||||
|
|
@ -144,7 +135,7 @@ When set to a value other than \code{None}, this variable defines the
|
||||||
default value for the \var{dir} argument to all the functions defined
|
default value for the \var{dir} argument to all the functions defined
|
||||||
in this module.
|
in this module.
|
||||||
|
|
||||||
If \var{tempdir} is unset or \code{None} at any call to any of the
|
If \code{tempdir} is unset or \code{None} at any call to any of the
|
||||||
above functions, Python searches a standard list of directories and
|
above functions, Python searches a standard list of directories and
|
||||||
sets \var{tempdir} to the first one which the calling user can create
|
sets \var{tempdir} to the first one which the calling user can create
|
||||||
files in. The list is:
|
files in. The list is:
|
||||||
|
|
@ -172,7 +163,7 @@ files in. The list is:
|
||||||
|
|
||||||
\begin{funcdesc}{gettempdir}{}
|
\begin{funcdesc}{gettempdir}{}
|
||||||
Return the directory currently selected to create temporary files in.
|
Return the directory currently selected to create temporary files in.
|
||||||
If \var{tempdir} is not None, this simply returns its contents;
|
If \code{tempdir} is not \code{None}, this simply returns its contents;
|
||||||
otherwise, the search described above is performed, and the result
|
otherwise, the search described above is performed, and the result
|
||||||
returned.
|
returned.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue