On Thu, Aug 14, 2008 at 6:05 AM, Bart Cramer <[EMAIL PROTECTED]> wrote:
> Dear tutors,
>
> I have the following code snippet:
>
> class N (object) :
>
> def __init__ (self, d={}) :
> self.d = d
>
> I assumed that on each call of the __init__ without a dictionary
> provided, a new dictionary is created.
http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
Kent
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor