[issue1417] Weakref not working properly

2007-11-15 Thread MHOOO
MHOOO added the comment: Yeah, cool :) Thanks =) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue1417] Weakref not working properly

2007-11-13 Thread Gabriel Genellina
Gabriel Genellina added the comment: I think this methodref function is simpler and much less intrusive -- nosy: +gagenellina Added file: http://bugs.python.org/file8744/methodref.py __ Tracker <[EMAIL PROTECTED]> __

[issue1417] Weakref not working properly

2007-11-11 Thread MHOOO
MHOOO added the comment: Well, too bad. My workaround (to make weakrefs work) is attached as a file. Added file: http://bugs.python.org/file8733/myhacks.py __ Tracker <[EMAIL PROTECTED]> __""" Som

[issue1417] Weakref not working properly

2007-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's easier to see what is going on if you print the object ids. The id of self.bla is different than the subsequent c1.bla. The first is freed before the second gets created. -- nosy: +rhettinger __ Tracker <[EMAI

[issue1417] Weakref not working properly

2007-11-10 Thread Georg Brandl
Georg Brandl added the comment: Closing as invalid. -- nosy: +georg.brandl resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue1417] Weakref not working properly

2007-11-10 Thread Paul Pogonyshev
Paul Pogonyshev added the comment: Because self.bla is a bound-method object, which is created and then instantly deleted as unreferenced. This is not a bug, it is expected. >>> class X: ... def foo (self): pass ... >>> x = X () >>> x.foo is x.foo False Note how the objects are different. -

[issue1417] Weakref not working properly

2007-11-10 Thread MHOOO
New submission from MHOOO: The following code is not working as expected: import weakref class cls1: def giveTo( self, to ): to.take( self.bla ) def bla(self ): pass class cls2: def take( self, what ): self.r