On Mon, 2006-10-16 at 10:51, Steven D'Aprano wrote:
> On Mon, 16 Oct 2006 07:26:05 -0700, abcd wrote:
>> > class Foo:
> > def __init__(self, name, data=[]):
>> The binding of the name "data" to the empty list happens at compile time,
> not runtime.
I think this statement needs to be clarified. The binding of "data" to
the empty list *does* happen at runtime, not at compile time. However,
the binding happens only once, when the "def" statement is executed, as
opposed to every time the __init__ function is called.
-Carsten