More efficient/elegant branching

Chris Angelico rosuav at gmail.com
Tue Dec 10 08:43:23 EST 2019


On Wed, Dec 11, 2019 at 12:26 AM Daniel Haude <dhaude at posteo.de> wrote:
> The whole thing is rather academic. Also my efficiency argument doesn't
> hold water because this routine is executed just a few times per hour. I
> like the "condition table" approach for its lower line count but I'll
> stick with if/elif because it's more conventional and therefore easier
> to understand for the casual reader.

Agreed. It is a fault with the linter, and nothing more.

ChrisA


More information about the Python-list mailing list