Message5605

Author jek
Recipients jek
Date 2010-03-29.00:01:43
SpamBayes Score 4.7760163e-06
Marked as misclassified No
Message-id <1269820903.88.0.056449615559.issue1586@psf.upfronthosting.co.za>
In-reply-to
Content
It seems like some styles of function invocation might leak a strong reference to the function arguments.  Given a 

  def make_ref(obj, kwarg=True):
      return weakref.ref(obj, callback)

Calling make_ref(someobj) returns a weakref that functions as expected, but make_ref(someobj, kwarg=True) returns a weakref that seemingly can't ever go stale.  Test case attached.
History
Date User Action Args
2010-03-29 00:01:43jeksetrecipients: + jek
2010-03-29 00:01:43jeksetmessageid: <1269820903.88.0.056449615559.issue1586@psf.upfronthosting.co.za>
2010-03-29 00:01:43jeklinkissue1586 messages
2010-03-29 00:01:43jekcreate