]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a number of minor markup errors.
authorFred Drake <fdrake@acm.org>
Sat, 21 Apr 2001 05:56:39 +0000 (05:56 +0000)
committerFred Drake <fdrake@acm.org>
Sat, 21 Apr 2001 05:56:39 +0000 (05:56 +0000)
Doc/lib/libcurses.tex
Doc/lib/librandom.tex
Doc/lib/libstdtypes.tex

index ef4444ab8237fec77348ed503d1684df66c1b768..bbb86a0394056deb31ab53f76d088436dc60be91 100644 (file)
@@ -510,8 +510,8 @@ file descriptor for typeahead checking.
 \begin{funcdesc}{unctrl}{ch}
 Returns a string which is a printable representation of the character
 \var{ch}.  Control characters are displayed as a caret followed by the
-character, for example as \verb|^C|. Printing characters are left as they
-are.
+character, for example as \code{\textasciicircum C}. Printing
+characters are left as they are.
 \end{funcdesc}
 
 \begin{funcdesc}{ungetch}{ch}
index e2e24e128d8f0e1e873e414f5045b6027028762d..69932604bf20a9f70c8238564081c9702ce929c4 100644 (file)
@@ -98,10 +98,10 @@ Bookkeeping functions:
 \begin{funcdesc}{seed}{\optional{x}}
   Initialize the basic random number generator.
   Optional argument \var{x} can be any hashable object.
-  If \var(x) is omitted or \code{None}, current system time is used;
+  If \var{x} is omitted or \code{None}, current system time is used;
   current system time is also used to initialize the generator when the
   module is first imported.
-  If \var(x) is not \code{None} or an int or long,
+  If \var{x} is not \code{None} or an int or long,
   \code{hash(\var{x})} is used instead.
   If \var{x} is an int or long, \var{x} is used directly.
   Distinct values between 0 and 27814431486575L inclusive are guaranteed
@@ -137,7 +137,7 @@ Bookkeeping functions:
   Change the internal state to what it would be if \function{random()}
   were called \var{n} times, but do so quickly.  \var{n} is a
   non-negative integer.  This is most useful in multi-threaded
-  programs, in conjuction with multiple instances of the \var{Random}
+  programs, in conjuction with multiple instances of the \class{Random}
   class: \method{setstate()} or \method{seed()} can be used to force
   all instances into the same internal state, and then
   \method{jumpahead()} can be used to force the instances' states as
index 79221b8c46878517e1d293ac20f2cfc64f326445..fc17785a0eff9340da18bfe0e400efe473757c3b 100644 (file)
@@ -867,9 +867,15 @@ arbitrary objects):
           {(1)}
   \lineiii{\var{a}.clear()}{remove all items from \code{a}}{}
   \lineiii{\var{a}.copy()}{a (shallow) copy of \code{a}}{}
-  \lineiii{\var{a}.has_key(\var{k})}
+  \lineiii{\var{k} \code{in} \var{a}}
           {\code{1} if \var{a} has a key \var{k}, else \code{0}}
           {}
+  \lineiii{\var{k} not in \var{a}}
+          {\code{0} if \var{a} has a key \var{k}, else \code{1}}
+          {}
+  \lineiii{\var{a}.has_key(\var{k})}
+          {Equivalent to \var{k} \code{in} \var{a}}
+          {}
   \lineiii{\var{a}.items()}
           {a copy of \var{a}'s list of (\var{key}, \var{value}) pairs}
           {(2)}
@@ -879,11 +885,11 @@ arbitrary objects):
           {(3)}
   \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
   \lineiii{\var{a}.get(\var{k}\optional{, \var{x}})}
-          {\code{\var{a}[\var{k}]} if \code{\var{a}.has_key(\var{k})},
+          {\code{\var{a}[\var{k}]} if \code{\var{k} in \var{a}},
            else \var{x}}
           {(4)}
   \lineiii{\var{a}.setdefault(\var{k}\optional{, \var{x}})}
-          {\code{\var{a}[\var{k}]} if \code{\var{a}.has_key(\var{k})},
+          {\code{\var{a}[\var{k}]} if \code{\var{k} in \var{a}},
            else \var{x} (also setting it)}
           {(5)}
   \lineiii{\var{a}.popitem()}