What does pylint's “Too few public methods” message mean
问题 I'm running pylint on some code, and receiving the error "Too few public methods (0/2)". What does this message mean? The pylint docs are not helpful: Used when class has too few public methods, so be sure it's really worth it. 回答1: The error basically says that classes aren't meant to just store data, as you're basically treating the class as a dictionary. Classes should have at least a few methods to operate on the data that they hold. If your class looks like this: class MyClass(object):