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

Fred L. Drake fdrake@users.sourceforge.net
Thu, 06 Sep 2001 11:21:32 -0700


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory usw-pr-cvs1:/tmp/cvs-serv24478/tut

Modified Files:
	tut.tex 
Log Message:
Make the examples for "Default Argument Values" more presentable and
less hostile to newbie use at the interactive prompt.
This is in response to SF bug #458654.


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** tut.tex	2001/08/14 19:55:42	1.147
--- tut.tex	2001/09/06 18:21:30	1.148
***************
*** 1354,1358 ****
  \begin{verbatim}
  i = 5
! def f(arg = i): print arg
  i = 6
  f()
--- 1354,1361 ----
  \begin{verbatim}
  i = 5
! 
! def f(arg=i):
!     print arg
! 
  i = 6
  f()
***************
*** 1367,1373 ****
  
  \begin{verbatim}
! def f(a, l = []):
!     l.append(a)
!     return l
  print f(1)
  print f(2)
--- 1370,1377 ----
  
  \begin{verbatim}
! def f(a, L=[]):
!     L.append(a)
!     return L
! 
  print f(1)
  print f(2)
***************
*** 1387,1395 ****
  
  \begin{verbatim}
! def f(a, l = None):
!     if l is None:
!         l = []
!     l.append(a)
!     return l
  \end{verbatim}
  
--- 1391,1399 ----
  
  \begin{verbatim}
! def f(a, L=None):
!     if L is None:
!         L = []
!     L.append(a)
!     return L
  \end{verbatim}