On 11/3/05, Greg Ewing <[EMAIL PROTECTED]> wrote: > > 3. If someone does want to associate values with objects, he can > > explicitly use id: > > dct[id(x)] = 3. > > This is fragile. Once all references to x are dropped, > it is possible for another object to be created having > the same id that x used to have. The dict now > unintentionally references the new object. > You are right. Please see the simple "ref" class that I wrote in my previous post, which solves this problem.
Noam _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com