Pylint false positives

Marko Rauhamaa marko at pacujo.net
Sat Aug 18 16:28:19 EDT 2018


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:
>> In a word, steer clear of metaprogramming.
>
> [...]
> (2) if you mean what you say, that means no decorators,

Correct. I don't find decorators all that useful or tasteful.

> no closures,

Closures I consider ordinary programming. Nothing meta there.

> no introspection ("reflection" in Java terms),

Introspection is suspect in general.

> no metaclasses (other than type),

Correct.

> no use of descriptors (other than the built-in ones),

Haven't used (or at least defined) them.

> no template-based programming,

Please, no.

> no source-code generators.

Lisp-style macros (or scheme syntax rules) are rather a clean way to do
that, but even that mechanism should be used very sparingly and
tastefully.

> No namedtuples, Enums, or data-classes.

They don't seem all that meta to me, but coincidentally I never found
uses for them in my Python code.


Marko



More information about the Python-list mailing list