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

Tim Peters python-dev@python.org
Sun, 26 Nov 2000 22:38:06 -0800


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory slayer.i.sourceforge.net:/tmp/cvs-serv25711/python/dist/src/doc/tut

Modified Files:
	tut.tex 
Log Message:
SF non-bug 123520:  fleshed out the tutorial's lambda example a little more.


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.120
retrieving revision 1.121
diff -C2 -r1.120 -r1.121
*** tut.tex	2000/10/25 23:22:54	1.120
--- tut.tex	2000/11/27 06:38:04	1.121
***************
*** 1498,1503 ****
  
  \begin{verbatim}
! def make_incrementor(n):
!     return lambda x, incr=n: x+incr
  \end{verbatim}
  
--- 1498,1510 ----
  
  \begin{verbatim}
! >>> def make_incrementor(n):
! ...     return lambda x, incr=n: x+incr
! ...
! >>> f = make_incrementor(42)
! >>> f(0)
! 42
! >>> f(1)
! 43
! >>>
  \end{verbatim}