pylint #9340 W0231: False negative on multiple inheritance without overriding constructor [open]
Please consider the following program:
class A(object): def __init__(self): print 'A constructed' class B(object): def __init__(self): print 'B constructed' class C(A, B): pass C()
When run, Python prints:
This means the constructor of class B is not called, which is most likely not what the user wants. However, when pylint is run on this code, it does not issue W0231 (__init__ method from base class '<name>' is not called).
If C's constructor is overridden and there aren't calls to both superclass constructors, W0231 is issued (once or twice, depending on whether one or both calls are missing).
|done in||<not specified>|
|closed by||<not specified>|