[Tutor] meaning

Benoit Dupire bdupire@seatech.fau.edu
Mon, 07 May 2001 19:29:09 -0400


This piece of code illustrates the fact that default arguments in  a
function are only evaluated once.
I ve just seen Remco answered your question... so read his message !
:o)

Benoit


Katharine Stoner wrote:

> Hi all, Would someone be so kind as to explain what this bit of code
> means line by line.Mostly I would like to know what the first four
> lines mean.Thanks,-Cameron #!/usr/local/bin/pythondef spam(n, l =[] )
> :    l.append(n)    return l x = spam(42)print xy = spam(39)print yz =
> spam(9999, y)print x, y, z

--
Benoit Dupire
Graduate Student
----------------
I'd like to buy a new Boomerang. How can i get rid of the old one?