On Wed, 18 Jan 2012 09:52:55 +0000 (GMT) Wilfried Falk <w_h_f...@yahoo.de> wrote:
> Hello Pythons, > > attached to this email is a pdf-file which shows, that "+=" does not > work well all along. Mybe somebody of you is able to explain my > observations in this respect. I will be glad about an answer. Best > regards Wilfried I am not sure I understand your first question. For the second this is explained here: http://docs.python.org/tutorial/controlflow.html#default-argument-values In the first case, you create a new list from the empty list at each call. In the second case, you modify the argument in place and it is not reevaluated between calls. Olive -- http://mail.python.org/mailman/listinfo/python-list