Hi all

Pylint is flagging a lot of lines as errors that I would consider to be acceptable.

I have an abstract class ClassA with a number of concrete sub-classes. ClassA has a method which invokes 'self.method_b()' which is defined separately on each sub-class. Pylint complains that "Instance of 'ClassA' has no 'method_b' member".

First question - as a matter of style, is Pylint correct? If so, I could define 'method_b' in ClassA and raise NotImplementedError. Is this considered more pythonic? The downside is that I have quite a few of them, so it would add some clutter.

Second question - if my present code is not unpythonic, is there an easy way to suppress the error messages, without disabling 'no-member' altogether?

Thanks

Frank Millman


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to