id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,branch,branch_author,launchpad_bug
5912,"Explain `d, self.deferred = self.deferred, None` idiom",tom.prince,exarkun,"This common idiom should be explained.

{{{
if self.deferred is not None:
     d, self.deferred = self.deferred, None
}}}
That code sets d to self.deferred at the same time as setting self.deferred to None. That way, if the code is called again later, then self.deferred, the condition in the if evaluates to False. Also, it gets rid of the reference to the deferred, allow it and all its callbacks (including the captured closures) to be garbage collected.",enhancement,closed,normal,,core,fixed,documentation,,branches/deferred-reference-clearing-5912,exarkun,
