Question about raise and exceptions.
Daniel Klein
danielkleinad at gmail.com
Wed Feb 28 22:46:47 EST 2007
On Wed, 28 Feb 2007 22:03:13 +0100, Bruno Desthuilliers
<bdesth.quelquechose at free.quelquepart.fr> wrote:
>Daniel Klein a écrit :
>> The arguments for TransitionError must be a tuple,
>
>Err...
>
>> eg:
>>
>> msg = "Going to error state %d from state %d" % (self.curr_state,
>> newstate)
>> raise TransitionError(self, curr_state, newstate, msg)
>
>Where did you see a tuple here ? You're code is *calling*
>TransitionError, passing it the needed arguments.
>
>Note that it's the correct syntax - but not the correct explanation !-)
My bad :-(
Thanks for setting me straight. I had (wrongly) thought that the stuff
inside of () was a tuple.
To the OP: Please accept my apology for providing incorrect
information.
Dan
More information about the Python-list
mailing list