Commit 53d291e5 authored by Guido van Rossum's avatar Guido van Rossum

* Doc/libfuncs.tex: don't use $math$ in description of pow(x,y,z);

	describe tuple()

	* Doc/libposixfile.tex: use tableiii instead of tableii, so
	partparse will work again (I know, chicken!)

	* Doc/libthread.tex: Added get_ident(); updated text on module
	availability

	* Doc/myformat.perl: Added sub do_cmd_Cpp
parent fa66a8eb
......@@ -239,8 +239,10 @@ there's no reliable way to determine whether this is the case.}
\end{funcdesc}
\begin{funcdesc}{pow}{x\, y\optional{\, z}}
Return \var{x} to the power \var{y}; if \var{z} is present, $x^y \bmod z$
is returned. The arguments must have
Return \var{x} to the power \var{y}; if \var{z} is present, return
\var{x} to the power \var{y}, modulo \var{z} (computed more
efficiently that \code{pow(\var{x}, \var{y}) \% \var{z}}).
The arguments must have
numeric types. With mixed operand types, the rules for binary
arithmetic operators apply. The effective operand type is also the
type of the result; if the result is not expressible in this type, the
......@@ -354,6 +356,14 @@ always attempt to return a string that is acceptable to \code{eval()};
its goal is to return a printable string.
\end{funcdesc}
\begin{funcdesc}{tuple}{object}
Return a tuple whose items are the same and in the same order as
\var{object}'s items. If \var{object} is alread a tuple, it
is returned unchanged. For instance, \code{tuple('abc')} returns
returns \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns
\code{(1, 2, 3)}.
\end{funcdesc}
\begin{funcdesc}{type}{object}
% XXXJH xref to buil-in objects here?
Return the type of an \var{object}. The return value is a type
......
......@@ -92,11 +92,11 @@ All methods return \code{IOError} when the request fails.
Format characters for the \code{lock()} method have the following meaning:
\begin{tableii}{|c|l|}{samp}{Format}{Meaning}
\lineii{u}{unlock the specified region}
\lineii{r}{request a read lock for the specified section}
\lineii{w}{request a write lock for the specified section}
\end{tableii}
\begin{tableiii}{|c|l|c|}{samp}{Format}{Meaning}{}
\lineiii{u}{unlock the specified region}{}
\lineiii{r}{request a read lock for the specified section}{}
\lineiii{w}{request a write lock for the specified section}{}
\end{tableiii}
In addition the following modifiers can be added to the format:
......@@ -115,12 +115,12 @@ is for query purposes only.
Format character for the \code{flags()} method have the following meaning:
\begin{tableii}{|c|l|}{samp}{Format}{Meaning}
\lineii{a}{append only flag}
\lineii{c}{close on exec flag}
\lineii{n}{no delay flag (also called non-blocking flag)}
\lineii{s}{synchronization flag}
\end{tableii}
\begin{tableiii}{|c|l|c|}{samp}{Format}{Meaning}{}
\lineiii{a}{append only flag}{}
\lineiii{c}{close on exec flag}{}
\lineiii{n}{no delay flag (also called non-blocking flag)}{}
\lineiii{s}{synchronization flag}{}
\end{tableiii}
In addition the following modifiers can be added to the format:
......
......@@ -7,7 +7,9 @@ threads of control sharing their global data space. For
synchronization, simple locks (a.k.a. \dfn{mutexes} or \dfn{binary
semaphores}) are provided.
The module is optional and supported on SGI and Sun Sparc systems only.
The module is optional and supported on SGI IRIX 4.x and 5.x and Sun
Solaris 2.x systems, as well as on systems that have a PTHREAD
implementation (e.g. KSR).
It defines the following constant and functions:
......@@ -41,6 +43,14 @@ Return a new lock object. Methods of locks are described below. The
lock is initially unlocked.
\end{funcdesc}
\begin{funcdesc}{get_ident}{}
Return the `thread identifier' of the current thread. This is a
nonzero integer. Its value has no direct meaning; it is intended as a
magic cookie to be used e.g. to index a dictionary of thread-specific
data. Thread identifiers may be recycled when a thread exits and
another thread is created.
\end{funcdesc}
Lock objects have the following methods:
\renewcommand{\indexsubitem}{(lock method)}
......
......@@ -239,8 +239,10 @@ there's no reliable way to determine whether this is the case.}
\end{funcdesc}
\begin{funcdesc}{pow}{x\, y\optional{\, z}}
Return \var{x} to the power \var{y}; if \var{z} is present, $x^y \bmod z$
is returned. The arguments must have
Return \var{x} to the power \var{y}; if \var{z} is present, return
\var{x} to the power \var{y}, modulo \var{z} (computed more
efficiently that \code{pow(\var{x}, \var{y}) \% \var{z}}).
The arguments must have
numeric types. With mixed operand types, the rules for binary
arithmetic operators apply. The effective operand type is also the
type of the result; if the result is not expressible in this type, the
......@@ -354,6 +356,14 @@ always attempt to return a string that is acceptable to \code{eval()};
its goal is to return a printable string.
\end{funcdesc}
\begin{funcdesc}{tuple}{object}
Return a tuple whose items are the same and in the same order as
\var{object}'s items. If \var{object} is alread a tuple, it
is returned unchanged. For instance, \code{tuple('abc')} returns
returns \code{('a', 'b', 'c')} and \code{tuple([1, 2, 3])} returns
\code{(1, 2, 3)}.
\end{funcdesc}
\begin{funcdesc}{type}{object}
% XXXJH xref to buil-in objects here?
Return the type of an \var{object}. The return value is a type
......
......@@ -92,11 +92,11 @@ All methods return \code{IOError} when the request fails.
Format characters for the \code{lock()} method have the following meaning:
\begin{tableii}{|c|l|}{samp}{Format}{Meaning}
\lineii{u}{unlock the specified region}
\lineii{r}{request a read lock for the specified section}
\lineii{w}{request a write lock for the specified section}
\end{tableii}
\begin{tableiii}{|c|l|c|}{samp}{Format}{Meaning}{}
\lineiii{u}{unlock the specified region}{}
\lineiii{r}{request a read lock for the specified section}{}
\lineiii{w}{request a write lock for the specified section}{}
\end{tableiii}
In addition the following modifiers can be added to the format:
......@@ -115,12 +115,12 @@ is for query purposes only.
Format character for the \code{flags()} method have the following meaning:
\begin{tableii}{|c|l|}{samp}{Format}{Meaning}
\lineii{a}{append only flag}
\lineii{c}{close on exec flag}
\lineii{n}{no delay flag (also called non-blocking flag)}
\lineii{s}{synchronization flag}
\end{tableii}
\begin{tableiii}{|c|l|c|}{samp}{Format}{Meaning}{}
\lineiii{a}{append only flag}{}
\lineiii{c}{close on exec flag}{}
\lineiii{n}{no delay flag (also called non-blocking flag)}{}
\lineiii{s}{synchronization flag}{}
\end{tableiii}
In addition the following modifiers can be added to the format:
......
......@@ -7,7 +7,9 @@ threads of control sharing their global data space. For
synchronization, simple locks (a.k.a. \dfn{mutexes} or \dfn{binary
semaphores}) are provided.
The module is optional and supported on SGI and Sun Sparc systems only.
The module is optional and supported on SGI IRIX 4.x and 5.x and Sun
Solaris 2.x systems, as well as on systems that have a PTHREAD
implementation (e.g. KSR).
It defines the following constant and functions:
......@@ -41,6 +43,14 @@ Return a new lock object. Methods of locks are described below. The
lock is initially unlocked.
\end{funcdesc}
\begin{funcdesc}{get_ident}{}
Return the `thread identifier' of the current thread. This is a
nonzero integer. Its value has no direct meaning; it is intended as a
magic cookie to be used e.g. to index a dictionary of thread-specific
data. Thread identifiers may be recycled when a thread exits and
another thread is created.
\end{funcdesc}
Lock objects have the following methods:
\renewcommand{\indexsubitem}{(lock method)}
......
......@@ -19,6 +19,7 @@ sub do_cmd_ABC{ join('', 'ABC', @_[0]); }
sub do_cmd_UNIX{ join('', 'Unix', @_[0]); }
sub do_cmd_ASCII{ join('', 'ASCII', @_[0]); }
sub do_cmd_C{ join('', 'C', @_[0]); }
sub do_cmd_Cpp{ join('', 'C++', @_[0]); }
sub do_cmd_EOF{ join('', 'EOF', @_[0]); }
# texinfo-like formatting commands: \code{...} etc.
......
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