Pychecker warns about Exception example from Python tutorial

Pekka Niiranen pekka.niiranen at
Fri Oct 15 19:55:29 CEST 2004

Hi there,

why does pychecker v0.8.14 gives this warning: Base class (exceptions.Exception) __init__() not called

when run against this example from Python Tutorial:

------------- code starts -------
class MyError(Exception):
     def __init__(self, value):
         self.value = value
     def __str__(self):
         return repr(self.value)

     raise MyError(2*2)
except MyError, e:
     print 'My exception occurred, value:', e.value

------------- code starts -------

What does this warning mean and how can I disable it?


More information about the Python-list mailing list