Re: [pygame] weakref WeakKeyDictionary machinery.
And why are you asking us? This is the pygame mailing list, last I checked, and a quick search of the code suggests that pygame doesn't use either Weak*Dictionary. On 6/1/08, Gabriel Hasbun [EMAIL PROTECTED] wrote: Hello I searched the whole web for good examples on weakref module's WeakKeyDictionary, but have found none, All I find is the Python Docs explanations, and some examples which actually doesn't explain how the mechanism of key reference removal works: import weakref class Tracking: _instances_dict = weakref.WeakValueDictionary( ) _num_generated = 0 def _ _init_ _(self): Tracking._num_generated += 1 Tracking._instances_dict[Tracking._num_generated] = self def instances( ): return _instances_dict.values( ) instances = staticmethod(instances)
[pygame] weakref WeakKeyDictionary machinery.
Hello I searched the whole web for good examples on weakref module's WeakKeyDictionary, but have found none, All I find is the Python Docs explanations, and some examples which actually doesn't explain how the mechanism of key reference removal works: import weakref class Tracking: _instances_dict = weakref.WeakValueDictionary( ) _num_generated = 0 def _ _init_ _(self): Tracking._num_generated += 1 Tracking._instances_dict[Tracking._num_generated] = self def instances( ): return _instances_dict.values( ) instances = staticmethod(instances)
[pygame] PyDay #2
Hi all, PyDay #2 will be held the weekend of June 14. It starts on Saturday Night at 7:30 PM GMT-6, and will end on Sunday Night at 7:30 PM GMT-6. Please throw out some theme ideas on the site! There recently have been some rule changes, so now Pyglet and PyOpenGL are now allowed :) The rules are also less strict. (yay!) The site has also been moved from googlegroups to wordpress. It's located here: http://pyedpypers.org/pyday If you have any questions or are unsure of any of the rules, please post on the site or send me an email. ([EMAIL PROTECTED]) Looking forward to seeing you there! -- - pymike (http://pymike.aftermatheffect.com/)