Laura Creighton <l...@openend.se>:

> My experience says that the people who are confused want lists to
> behave like tuples. period. i.e. they don't want lists to be mutable.

I think it's simpler than that. When you have:

   def f(x=[]):
       y = []

the first [] is evaluated when "def" is executed, while the latter [] is
evaluated whenever "f" is executed. It's easy to be confused.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to