Pylint false positives

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Aug 18 15:45:58 EDT 2018


On Sat, 18 Aug 2018 00:33:26 +0300, Marko Rauhamaa wrote:

> Chris Angelico <rosuav at gmail.com>:
>> Programming is heavily about avoiding duplicated work.
> 
> That is one aspect, but overcondensing and overabstracting programming
> logic usually makes code less obvious to its maintainer. 

That may very well be true, but we're not talking about those evils here. 
We're talking about a simple factory technique for creating a number of 
identical objects in a loop.


[...]
> I would guess such techniques could come in handy in some framework
> development but virtually never in ordinary application development. In
> a word, steer clear of metaprogramming.

Depending on your definition of metaprogramming, either:

(1) this either isn't metaprogramming at all, merely programming and no 
more scary than populating a dict at runtime; or


(2) if you mean what you say, that means no decorators, no closures, no 
introspection ("reflection" in Java terms), no metaclasses (other than 
type), no use of descriptors (other than the built-in ones), no template-
based programming, no source-code generators. No namedtuples, Enums, or 
data-classes.


-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson




More information about the Python-list mailing list