spir wrote:
Lie Ryan dixit:
class Error(Exception):
def __init__(self, value):
self.value = value
def printer(self, value):
print self.value
You can also use __str__ instead of printer. This will give a standard output
form for your error automatically use
On Wed, Dec 30, 2009 at 8:39 AM, spir wrote:
> Lie Ryan dixit:
>
>> class Error(Exception):
>> def __init__(self, value):
>> self.value = value
>> def printer(self, value):
>> print self.value
>
> You can also use __str__ instead of printer. This will give a standard ou
Lie Ryan dixit:
> class Error(Exception):
> def __init__(self, value):
> self.value = value
> def printer(self, value):
> print self.value
You can also use __str__ instead of printer. This will give a standard output
form for your error automatically used by print and
On 12/30/2009 7:47 AM, Grigor Kolev wrote:
Hi.
Can someone explain me where is my mistake.
---
class Error(Exception):
def printer(self , value ):
self.value = value
print self.value
def oops():
raise Erro
On Tue, Dec 29, 2009 at 9:47 PM, Grigor Kolev wrote:
> Hi.
> Can someone explain me where is my mistake.
> ---
> class Error(Exception):
> def printer(self , value ):
> self.value = value
> print self.value
> def oops
Hi.
Can someone explain me where is my mistake.
---
class Error(Exception):
def printer(self , value ):
self.value = value
print self.value
def oops():
raise Error
def domoed():
try: