Re: [Tutor] Problem with a class
On Mon, 22 May 2006, Andrew Robert wrote: > class TriggerMessage: > > def __init__(self,data): This suggests that it's to be invoked along the lines of: foo = TriggerMessage(data) > def decode(self): And this as: bar = foo.decode() > test = TriggerMessage.decode(data)
[Tutor] Problem with a class
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Everyone, I am getting an odd traceback when using a class. The class I am using is class TriggerMessage: def __init__(self,data): """ Unpacks the passed binary data based on the MQTCM2