[issue21576] Overwritten (custom) uuid inside dictionary

2014-06-02 Thread R. David Murray
R. David Murray added the comment: In python, everything is references to objects. So yes, this is expected Python behavior. Issue 20135 is about improving the FAQ entries on this subject, so I'm closing this as a duplicate of that issue. -- nosy: +r.david.murray stage: -> resolved

[issue21576] Overwritten (custom) uuid inside dictionary

2014-05-25 Thread beta
beta added the comment: import copy ship = {'Name': 'Slagschip', 'Blocks': 5} shipData = copy.deepcopy(ship) # needed, otherwise linked-object shipData['uuid'] = Id # unique Id Is this the correct Python behavior? -- resolution: -> not a bug ___ P

[issue21576] Overwritten (custom) uuid inside dictionary

2014-05-25 Thread beta
New submission from beta: Results: Block: 2d = {'Blocks': 3, 'Name': 'Fregatten', 'uuid': 0} same as {'Blocks': 3, 'Name': 'Fregatten', 'uuid': 0} Block: 2e = {'Blocks': 3, 'Name': 'Fregatten', 'uuid': 0} same as {'Blocks': 3, 'Name': 'Fregatten', 'uuid': 0} Block: 2f = {'Blocks': 3, 'Name': 'F