flake8-comprehensions icon indicating copy to clipboard operation
flake8-comprehensions copied to clipboard

What about adding the walrus operator := ?

Open cclauss opened this issue 2 years ago • 2 comments

Description

The walrus operator can be quite helpful but it is not yet widely adopted. All the walrus-related packages on PyPI are either unrelated to := or they actively discourage its use like https://pypi.org/project/flake8-walrus

It would be cool to have a way to automatically spot places where := could be used to accelerate its adoption.

cclauss avatar Jun 02 '22 14:06 cclauss

I'd be happy to consider concrete proposals where using the walrus would lead to a comprehension/generator expression being faster. Do you have any?

adamchainz avatar Jun 03 '22 09:06 adamchainz

This seems more of a suggestion for flake8-simplify https://pypi.org/project/flake8-simplify/

joaoe avatar Jul 28 '22 09:07 joaoe