]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
* Doc/libfuncs.tex: don't use $math$ in description of pow(x,y,z);
authorGuido van Rossum <guido@python.org>
Fri, 12 Aug 1994 13:13:50 +0000 (13:13 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 12 Aug 1994 13:13:50 +0000 (13:13 +0000)
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

Doc/lib/libfuncs.tex
Doc/lib/libposixfile.tex
Doc/lib/libthread.tex
Doc/libfuncs.tex
Doc/libposixfile.tex
Doc/libthread.tex
Doc/myformat.perl

index b37920d0c493307cf20ca01d0e3e6a3bd4a83cc5..379011da1e5cd8eecbbd4da323343beafd07c29b 100644 (file)
@@ -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
index 0d9cb324b171a97127d6930b38c8a8b1f285473c..346f5769f41e10e3294718320bbba9c9975ff0b6 100644 (file)
@@ -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:
 
index c836615f44ac898b29cf5fa17ae604add85125d0..4208c2d1e62b623886c0a0d79852fd1ac63d4e1e 100644 (file)
@@ -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)}
index b37920d0c493307cf20ca01d0e3e6a3bd4a83cc5..379011da1e5cd8eecbbd4da323343beafd07c29b 100644 (file)
@@ -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
index 0d9cb324b171a97127d6930b38c8a8b1f285473c..346f5769f41e10e3294718320bbba9c9975ff0b6 100644 (file)
@@ -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:
 
index c836615f44ac898b29cf5fa17ae604add85125d0..4208c2d1e62b623886c0a0d79852fd1ac63d4e1e 100644 (file)
@@ -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)}
index a2130b136146cc92c8042845d13ab6919b7ae1cd..bfb482144ff43ad3dc41f901462a378f6aea8b02 100644 (file)
@@ -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.