[Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.100.2.2,1.100.2.3

Fred L. Drake fdrake@weyr.cnri.reston.va.us
Thu, 17 Feb 2000 13:02:42 -0500 (EST)


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

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

Patch from Skip Montanaro <skip@mojam.com>, with *really* minor markup 
nits fixed:

The diff below has one significant change (the English description of the
comparison operators).  The first and last changes are quite trivial.  The
third change isn't truly earth-shaking, but may serve somewhat to appease C
programmers investigating Python for the first time.


Index: tut.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.100.2.2
retrieving revision 1.100.2.3
diff -C2 -r1.100.2.2 -r1.100.2.3
*** tut.tex	1999/12/03 22:00:31	1.100.2.2
--- tut.tex	2000/02/17 18:02:39	1.100.2.3
***************
*** 113,118 ****
  
  Python allows writing very compact and readable programs.  Programs
! written in Python are typically much shorter than equivalent C
! programs, for several reasons:
  \begin{itemize}
  \item
--- 113,118 ----
  
  Python allows writing very compact and readable programs.  Programs
! written in Python are typically much shorter than equivalent C or
! \Cpp{} programs, for several reasons:
  \begin{itemize}
  \item
***************
*** 854,859 ****
  length is true, empty sequences are false.  The test used in the
  example is a simple comparison.  The standard comparison operators are
! written the same as in C: \code{<}, \code{>}, \code{==}, \code{<=},
! \code{>=} and \code{!=}.
  
  \item
--- 854,860 ----
  length is true, empty sequences are false.  The test used in the
  example is a simple comparison.  The standard comparison operators are
! written the same as in C: \code{<} (less than), \code{>} (greater than),
! \code{==} (equal to), \code{<=} (less than or equal to),
! \code{>=} (greater than or equal to) and \code{!=} (not equal to).
  
  \item
***************
*** 1780,1783 ****
--- 1781,1787 ----
  
  Note that in Python, unlike C, assignment cannot occur inside expressions.
+ C programmers may grumble about this, but it avoids a common class of
+ problems encountered in C programs: typing \code{=} in an expression when
+ \code{==} was intended.
  
  \section{Comparing Sequences and Other Types \label{comparing}}
***************
*** 3461,3465 ****
  defined in the same base class, may in fact end up calling a method of
  a derived class that overrides it.  (For \Cpp{} programmers: all methods
! in Python are ``virtual functions''.)
  
  An overriding method in a derived class may in fact want to extend
--- 3465,3469 ----
  defined in the same base class, may in fact end up calling a method of
  a derived class that overrides it.  (For \Cpp{} programmers: all methods
! in Python are effectively \keyword{virtual}.)
  
  An overriding method in a derived class may in fact want to extend