That looks just like my code. What's the problem?

On Sun, Aug 8, 2010 at 6:13 PM, Jesse Jaggars <jhjagg...@gmail.com> wrote:
>
> Is it possible that you are using a mutable class object? A common
> gotcha is to do something like this:
>
>>>> class foo(object):
> ...   x = []
> ...
>>>> a = foo()
>>>> b = foo()
>>>> a.x.append(123)
>>>> b.x
> [123]
>
> And expect b.x to be an empty list.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to