copy on write

Eduardo Suarez-Santana esuarez at itccanarias.org
Fri Jan 13 06:44:56 EST 2012


El 13/01/12 11:33, Eduardo Suarez-Santana escribió:
> I wonder whether this is normal behaviour.
>
Even simpler:

$ python
Python 2.7.2 (default, Oct 31 2011, 11:54:55)
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> r={'a':1};
 >>> d={};
 >>> d['x']=r;
 >>> d['y']=r;
 >>> d['x']['a']=3
 >>> d['y']
{'a': 3}
 >>>




More information about the Python-list mailing list