On Wed, 21 Sep 2016 01:41 am, Tim Johnson wrote:

> Not to confuse idiomatic code validation with pep8 validation (I use
> elpy on emacs)
> Is there such a thing as a validator for _idiomatic_ code?

Yes, it is called a linter. There are various linters available:

pylint, pychecker, jedi, flake

there may be others. Depending on how good the linter is, they will do
things like flag unused arguments, dead code, use of deprecated features,
and so forth. Some of them may be very opinionated, e.g. flag uses of map()
as unidiomatic and recommend a list comprehension instead. Whether you
agree with that opinion or not is up to you.

“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.


Reply via email to