An other feature assumed by EditingContexts is that they make sure that a given object has a single instance within them. So, if you fetch a particular object, then later access the same object e.g. by traversing some relationships, you are sure that the two are the same object (exactly the same, not only the same values). Put differently, say you have B in relation to A and C in relation to A, (and given that A, B and C are in the same EditingContext as they should be), you will always have this situation:
B C \ / \ / \ / A
and you will NEVER get such a graph:
B C \ \ \ \ A A'
To create an EditingContext, simply use the statements:
>>> from Modeling.EditingContext import EditingContext >>> ec=EditingContext()
Comments are welcome: Sebastien Bigaret / Modeling Home Page