[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pylint false positives

On Fri, Aug 17, 2018 at 9:49 PM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> "Code running directly under the class" describes every use of the class
>> keyword (except those with an empty body). If you write:
>>     class Spam:
>>         x = 1
>> you are running code under the class. This is not just a pedantic
>> technicality,
> Yes, it absolutely is, in this context. Having code other than
> assignments and function definitions under the class statement
> is extremely rare.

Programming is heavily about avoiding duplicated work. Creating
methods is work. Creating many identical (or similar) methods is
duplicated work. What's wrong with using a loop to create functions?