This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, pitrou, tweksteen
Date 2012-07-27.17:46:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343411198.0.0.680811288569.issue15464@psf.upfronthosting.co.za>
In-reply-to
Content
That is one way to do it.  But it would be better to use a local variable rather than an attribute of the class (because otherwise you have to worry about resetting the value if more than one test uses the same pattern).  Something like this would be better

called = []
def cb(packet):
    called.append(1)
History
Date User Action Args
2012-07-27 17:46:38chris.jerdoneksetrecipients: + chris.jerdonek, pitrou, tweksteen
2012-07-27 17:46:37chris.jerdoneksetmessageid: <1343411198.0.0.680811288569.issue15464@psf.upfronthosting.co.za>
2012-07-27 17:46:37chris.jerdoneklinkissue15464 messages
2012-07-27 17:46:37chris.jerdonekcreate