Ask Solem <a...@opera.com> added the comment:

Maybe surprising but not so weird if you think about what happens
behind the scenes.

When you do

    >>> x = man.list()
    >>> x.append({})

You send an empty dict to the manager to be appended to x

when do:

   >>> x[0]
   {}

you receive a local copy of the empty dict from the manager process.


So this:

    >>> x[0]["a"] = 5

will only modify the local copy.

What you would have to do is:

    >>> x.append({})
    >>> t = x[0]
    >>> t["a"] = 5
    >>> x[0] = t

This will not be atomic of course, so this may be something
to take into account.

What maybe could be supported is something like:
    >>> x[0] = manager.dict()
    >>>x[0]["foo"] = "bar"

but otherwise I wouldn't consider this a bug.

----------
nosy: +asksol

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9801>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to