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

Pylint false positives

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. It is essential
to find coding idioms that communicate ideas as clearly as possible. In
some situations boilerplate and redundancy can help make the code more
robust, as not every line of code becomes a clever brainteaser.

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

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.