| 1 | initial version |
H = G does not make a copy of the graph. G and H are the very same object in memory, and if you modify one the other also contains the modification. It is the very same memory address. If you want to copy your graph, use H = copy(G).
This is a behaviour that you should expect in any object-oriented language.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.