[Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.20.2.7,1.20.2.8

Fred L. Drake python-dev@python.org
Wed, 22 Mar 2000 16:45:33 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory weyr:/home/fdrake/projects/python/Doc-152p2/lib

Modified Files:
      Tag: release152p1-patches
	libstdtypes.tex 
Log Message:

Minor clarifications, really small nits.


Index: libstdtypes.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.20.2.7
retrieving revision 1.20.2.8
diff -C2 -r1.20.2.7 -r1.20.2.8
*** libstdtypes.tex	2000/03/16 20:34:24	1.20.2.7
--- libstdtypes.tex	2000/03/22 21:45:30	1.20.2.8
***************
*** 31,39 ****
  	\withsubitem{(Built-in object)}{\ttindex{None}}
  
! \item	zero of any numeric type, e.g., \code{0}, \code{0L}, \code{0.0}.
  
! \item	any empty sequence, e.g., \code{''}, \code{()}, \code{[]}.
  
! \item	any empty mapping, e.g., \code{\{\}}.
  
  \item	instances of user-defined classes, if the class defines a
--- 31,40 ----
  	\withsubitem{(Built-in object)}{\ttindex{None}}
  
! \item	zero of any numeric type, for example, \code{0}, \code{0L},
!         \code{0.0}, \code{0j}.
  
! \item	any empty sequence, for example, \code{''}, \code{()}, \code{[]}.
  
! \item	any empty mapping, for example, \code{\{\}}.
  
  \item	instances of user-defined classes, if the class defines a
***************
*** 79,85 ****
  
  \item[(2)]
! \samp{not} has a lower priority than non-Boolean operators, so e.g.
! \code{not a == b} is interpreted as \code{not(a == b)}, and
! \code{a == not b} is a syntax error.
  
  \end{description}
--- 80,86 ----
  
  \item[(2)]
! \samp{not} has a lower priority than non-Boolean operators, so
! \code{not \var{a} == \var{b}} is interpreted as \code{not (\var{a} ==
! \var{b})}, and \code{\var{a} == not \var{b}} is a syntax error.
  
  \end{description}
***************
*** 90,97 ****
  Comparison operations are supported by all objects.  They all have the
  same priority (which is higher than that of the Boolean operations).
! Comparisons can be chained arbitrarily, e.g. \code{x < y <= z} is
! equivalent to \code{x < y and y <= z}, except that \code{y} is
! evaluated only once (but in both cases \code{z} is not evaluated at
! all when \code{x < y} is found to be false).
  \indexii{chaining}{comparisons}
  
--- 91,99 ----
  Comparison operations are supported by all objects.  They all have the
  same priority (which is higher than that of the Boolean operations).
! Comparisons can be chained arbitrarily; for example, \code{\var{x} <
! \var{y} <= \var{z}} is equivalent to \code{\var{x} < \var{y} and
! \var{y} <= \var{z}}, except that \var{y} is evaluated only once (but
! in both cases \var{z} is not evaluated at all when \code{\var{x} <
! \var{y}} is found to be false).
  \indexii{chaining}{comparisons}
  
***************
*** 145,151 ****
  object comparisons.
  
! (Implementation note: objects of different types except numbers are
! ordered by their type names; objects of the same types that don't
! support proper comparison are ordered by their address.)
  
  Two more operations with the same syntactic priority,
--- 147,153 ----
  object comparisons.
  
! \strong{Implementation note:} Objects of different types except
! numbers are ordered by their type names; objects of the same types
! that don't support proper comparison are ordered by their address.
  
  Two more operations with the same syntactic priority,
***************
*** 245,249 ****
  For (plain or long) integer division, the result is an integer.
  The result is always rounded towards minus infinity: 1/2 is 0, 
! (-1)/2 is -1, 1/(-2) is -1, and (-1)/(-2) is 0.
  \indexii{integer}{division}
  \indexiii{long}{integer}{division}
--- 247,253 ----
  For (plain or long) integer division, the result is an integer.
  The result is always rounded towards minus infinity: 1/2 is 0, 
! (-1)/2 is -1, 1/(-2) is -1, and (-1)/(-2) is 0.  Note that the result
! is a long integer if either operand is a long integer, regardless of
! the numeric value.
  \indexii{integer}{division}
  \indexiii{long}{integer}{division}
***************
*** 311,315 ****
  
  Strings literals are written in single or double quotes:
! \code{'xyzzy'}, \code{"frobozz"}.  See Chapter 2 of the \emph{Python
  Reference Manual} for more about string literals.  Lists are
  constructed with square brackets, separating items with commas:
--- 315,319 ----
  
  Strings literals are written in single or double quotes:
! \code{'xyzzy'}, \code{"frobozz"}.  See chapter 2 of the \emph{Python
  Reference Manual} for more about string literals.  Lists are
  constructed with square brackets, separating items with commas:
***************
*** 318,322 ****
  empty tuple must have the enclosing parentheses, e.g.,
  \code{a, b, c} or \code{()}.  A single item tuple must have a trailing
! comma, e.g., \code{(d,)}.
  \indexii{sequence}{types}
  \indexii{string}{type}
--- 322,326 ----
  empty tuple must have the enclosing parentheses, e.g.,
  \code{a, b, c} or \code{()}.  A single item tuple must have a trailing
! comma: \code{(d,)}.
  \indexii{sequence}{types}
  \indexii{string}{type}
***************
*** 527,530 ****
--- 531,536 ----
  
  \subsection{Mapping Types \label{typesmapping}}
+ \indexii{mapping}{types}
+ \indexii{dictionary}{type}
  
  A \dfn{mapping} object maps values of one type (the key type) to
***************
*** 539,545 ****
  dictionary entry.
  
- \indexii{mapping}{types}
- \indexii{dictionary}{type}
- 
  Dictionaries are created by placing a comma-separated list of
  \code{\var{key}: \var{value}} pairs within braces, for example:
--- 545,548 ----
***************
*** 646,650 ****
  \nodename{Classes and Instances}
  
! See Chapters 3 and 7 of the \emph{Python Reference Manual} for these.
  
  
--- 649,653 ----
  \nodename{Classes and Instances}
  
! See chapters 3 and 7 of the \emph{Python Reference Manual} for these.
  
  
***************
*** 806,810 ****
    newline) and an incomplete line may be returned.
    An empty string is returned when \EOF{} is hit
!   immediately.  Note: unlike \code{stdio}'s \cfunction{fgets()}, the returned
    string contains null characters (\code{'\e 0'}) if they occurred in the
    input.
--- 809,813 ----
    newline) and an incomplete line may be returned.
    An empty string is returned when \EOF{} is hit
!   immediately.  Note: Unlike \code{stdio}'s \cfunction{fgets()}, the returned
    string contains null characters (\code{'\e 0'}) if they occurred in the
    input.
***************
*** 836,845 ****
  file is truncated to (at most) that size.  The size defaults to the
  current position.  Availability of this function depends on the
! operating system version (e.g., not all \UNIX{} versions support this
  operation).
  \end{methoddesc}
  
  \begin{methoddesc}[file]{write}{str}
! Write a string to the file.  There is no return value.  Note: due to
  buffering, the string may not actually show up in the file until
  the \method{flush()} or \method{close()} method is called.
--- 839,848 ----
  file is truncated to (at most) that size.  The size defaults to the
  current position.  Availability of this function depends on the
! operating system version (for example, not all \UNIX{} versions support this
  operation).
  \end{methoddesc}
  
  \begin{methoddesc}[file]{write}{str}
! Write a string to the file.  There is no return value.  Note: Due to
  buffering, the string may not actually show up in the file until
  the \method{flush()} or \method{close()} method is called.