What is a function parameter =[] for?

Ian Kelly ian.g.kelly at gmail.com
Fri Nov 20 11:18:44 EST 2015


On Fri, Nov 20, 2015 at 5:39 AM, BartC <bc at freeuk.com> wrote:
> * The persistent nonsense that somehow [] is mutable (what happens is that
> [] is assigned to a variable, and /that/ is mutable) (And I will probably
> get some flak now because 'assign' and 'variable' are meaningless in
> Python!)

I think the problem here is that you're talking as if [] is a unique
value, which it isn't. [] is a list display that *constructs* a list,
not a list itself.



More information about the Python-list mailing list