> I saw the following example at
> http://nafiulis.me/potential-pythonic-pitfalls.html#using-mutable-default-arguments
> and did not believe the output produced and had to try it for myself....

Pylint (and perhaps other Python "linters") would, I think, warn you
that you were using a mutable object as a default. It's more obvious
that the list is being reused if you call foo with different values
each time.

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

Reply via email to