"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> On 1 mar, 04:46, Daniel Klein <[EMAIL PROTECTED]> wrote:
> > Thanks for setting me straight. I had (wrongly) thought that the
> > stuff inside of () was a tuple.
>
> For the record, it's the ',' that makes the tuple. The () are (in
> this context
On 1 mar, 04:46, Daniel Klein <[EMAIL PROTECTED]> wrote:
> On Wed, 28 Feb 2007 22:03:13 +0100, Bruno Desthuilliers
>
>
>
> <[EMAIL PROTECTED]> wrote:
> >Daniel Klein a écrit :
> >> The arguments for TransitionError must be a tuple,
>
> >Err...
>
> >> eg:
>
> >> msg = "Going to error state %d from s
On Wed, 28 Feb 2007 22:03:13 +0100, Bruno Desthuilliers
<[EMAIL PROTECTED]> 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,
Ben Finney a écrit :
(snip)
> The syntax of the 'raise' statement requires one, two, or three
> arguments, all of which instruct 'raise' what to do, and none of which
> refer to arguments given to the exception instance.
Not quite. If the first argument is a class and the second argument is
not a
Steven W. Orr a écrit :
> On Wednesday, Feb 28th 2007 at 22:03 +0100, quoth Bruno Desthuilliers:
>
> =>Daniel Klein a ?crit :
> =>> On Wed, 28 Feb 2007 13:48:54 -0500 (EST), "Steven W. Orr"
> =>> <[EMAIL PROTECTED]> wrote:
> =>>
> =>>
> =>>>When I run it I get this:
> =>>>
> =>>>884 > ./t_fsm.py
On Wednesday, Feb 28th 2007 at 22:03 +0100, quoth Bruno Desthuilliers:
=>Daniel Klein a ?crit :
=>> On Wed, 28 Feb 2007 13:48:54 -0500 (EST), "Steven W. Orr"
=>> <[EMAIL PROTECTED]> wrote:
=>>
=>>
=>>>When I run it I get this:
=>>>
=>>>884 > ./t_fsm.py
=>>>Traceback (most recent call last):
=>>>
"Steven W. Orr" <[EMAIL PROTECTED]> writes:
> In my class I have
I assume you mean "in my module", since you're showing us several
classes.
> class TransitionError(Error):
> [...]
> def __init__(self, previous, next, message):
Here you define the arguments that must be passed when
Daniel Klein a écrit :
> On Wed, 28 Feb 2007 13:48:54 -0500 (EST), "Steven W. Orr"
> <[EMAIL PROTECTED]> wrote:
>
>
>>When I run it I get this:
>>
>>884 > ./t_fsm.py
>>Traceback (most recent call last):
>> File "./t_fsm.py", line 3, in ?
>>from fsm import *
>> File "/home/boston/VIASAT/sorr
On Wed, 28 Feb 2007 13:48:54 -0500 (EST), "Steven W. Orr"
<[EMAIL PROTECTED]> wrote:
>When I run it I get this:
>
>884 > ./t_fsm.py
>Traceback (most recent call last):
> File "./t_fsm.py", line 3, in ?
> from fsm import *
> File "/home/boston/VIASAT/sorr/py/fsm/fsm.py", line 76
> raise
In my class I have
class Error(Exception):
"""Base class for exceptions in this module."""
pass
class TransitionError(Error):
"""Raised when an operation attempts a state transition that's not
allowed.
Attributes:
previous -- st
10 matches
Mail list logo