Adam Pridgen wrote:
> Sorry for the long email, and thanks in advance.
> 
> In the below example, is the list foo supposed to retain the value
> after the function, Bar(), returns?

Yes

> Is the list foo supposed to reinitialized on each call to Bar(),
> meaning len(foo) == 0, and when Bar() returns len(foo) (when Bar() is
> called w/out parameters)?

No. See
http://www.effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to