"HYRY" <[EMAIL PROTECTED]> wrote:

> Why the third print stement output "'comments': [(1, 2, 3)]", I think
> it should be [].

default arguments are calculated once.  for details, see the tutorial

  http://docs.python.org/tut/node6.html#SECTION006710000000000000000

and the FAQ:

  http://pyfaq.infogami.com/why-are-default-values-shared-between-objects

and the language reference:

  http://python.org/doc/ref/function.html
  http://pyref.infogami.com/def

</F> 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to