On Tue, 23 Dec 2008 21:01:21 +0000, Michael Foord <fuzzy...@voidspace.org.uk> wrote: > Mark Russo wrote: > >> In IronPython 2.0, when I replace a Point object in a list using >> assignment, a copy of the Point object is used to replace the original >> list element rather than the original Point itself. This does not >> happen with user-defined objects. It also does not happen with Point >> objects in IronPython 1.1. >> > > Point objects are value types, so some operations cause them to be > copied. Probably the way they are used under the hood has changed with > IronPython 2. >
But, this has to be considered a rather serious bug, doesn't it? If I create an object p2, then insert it into a list at l[0], the Python contract guarantees that l[0] and p2 are references to the same object, so that modifying one must modify the other. Am I missing the point here? Is there another level of indirection in the implementation that means these really are references to the same object, despite having different IDs? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com