Re: [Python-ideas] weakref.WeakKeyDictionary is (basically) useless

Dec. 31, 2014
6:26 p.m.
On Wed, Dec 31, 2014 at 6:00 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
A cursory glance suggests that might work for my use-case, but I would want to examine it more thoroughly for race conditions and other hazards. In particular, I'd be concerned about the potential performance cost of removing things immediately on finalization (the stdlib implementation uses a semi-lazy approach here, which I still don't entirely understand). I'm also a little nervous about doing anything remotely interesting from a finalizer. With a little fine-tuning, however, this could be pulled into a separate WeakKeyIDDictionary implementation, which would be more modular and easier to work with. -- Kevin Norris
3708
Age (days ago)
3708
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kevin Norris