In article ,
Terry Reedy wrote:
>Steven Woody wrote:
>>
>> And, I expect that when I raise a MyError as
>> raise MyError, "my message"
>
>In 2.x you may and in 3.0 you must write that as
>raise MyError("my message")
>Best to start looking forward ;-).
Funny, when I suggested to MvL that he
On Wed, Jan 7, 2009 at 12:02 PM, Terry Reedy wrote:
> Steven Woody wrote:
>>
>> Hi,
>>
>> I am trying define an Exception as below:
>>
>> class MyError(Exception):
>>def __init__(self, message):
>>self.message = message
>>
>> And, I expect that when I raise a MyError as
>>raise MyE
Steven Woody wrote:
Hi,
I am trying define an Exception as below:
class MyError(Exception):
def __init__(self, message):
self.message = message
And, I expect that when I raise a MyError as
raise MyError, "my message"
In 2.x you may and in 3.0 you must write that as
raise MyEr
On Wed, Jan 7, 2009 at 11:09 AM, Chris Rebert wrote:
> On Tue, Jan 6, 2009 at 6:56 PM, Steven Woody wrote:
>> Hi,
>>
>> I am trying define an Exception as below:
>>
>> class MyError(Exception):
>>def __init__(self, message):
>>self.message = message
>>
>> And, I expect that when I rai
On Tue, Jan 6, 2009 at 6:56 PM, Steven Woody wrote:
> Hi,
>
> I am trying define an Exception as below:
>
> class MyError(Exception):
>def __init__(self, message):
>self.message = message
>
> And, I expect that when I raise a MyError as
>raise MyError, "my message"
> the python sho
Hi,
I am trying define an Exception as below:
class MyError(Exception):
def __init__(self, message):
self.message = message
And, I expect that when I raise a MyError as
raise MyError, "my message"
the python should print a line such as
MyError: my message
But I did not get th