[Python-projects] What is preferred way to indicate stub methods?

Emin.shopper Martinian.shopper emin.shopper at gmail.com
Tue Jan 22 21:15:48 CET 2008


Dear Experts,

How do you indicate stub methods so pylint doesn't complain?

For example, I often define classes as shown below but get various pylint
warnings such as R0201 (method could be a function). I could disable the
appropriate warnings, but I'm wondering if there is a better way to define
such stub-methods.

class BaseClass:
  def __init__(self,member):
     self.member = member

 def double(self):
     "Sub-classes should override this to return a doubled version of
member."
     return NotImplemented
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20080122/b8ab7994/attachment.htm 


More information about the Python-Projects mailing list