[issue7366] weakref module example relies on behaviour not guaranteed by id()

2010-02-22 Thread Jack Diederich
Jack Diederich added the comment: This is true but /any/ key in the WeakValueDictionary could be reused and result in similar behavior, not just the id() of the inserted value. I'm closing at "won't fix" -- nosy: +jackdied resolution: -> wont fix status: open -> closed

[issue7366] weakref module example relies on behaviour not guaranteed by id()

2009-11-19 Thread James Henstridge
James Henstridge added the comment: Forgot to include a link to the documentation I was talking about: http://docs.python.org/library/weakref#example This example also appears in the 2.7a0 and 3.2a0 documentation. -- ___ Python tracker

[issue7366] weakref module example relies on behaviour not guaranteed by id()

2009-11-19 Thread James Henstridge
New submission from James Henstridge : The documentation for the weakref module contains an example that uses WeakValueDictionary to implement a id2obj() lookup function that doesn't store strong references to those objects. This example implicitly assumes that the id() of an object will be uniq