New check: Walrus operator recommended #4862
Labels
Assignment expression
Related to the walrus operator / assignment expression
Enhancement ✨
Improvement to a component
Good first issue
Friendly and approachable by new contributors
Help wanted 🙏
Outside help would be appreciated, good for new contributors
python 3.8
Milestone
Current problem
Consider this still-common pattern:
Desired solution
As of Python 3.8, this can be rewritten with the "walrus":
Pylint should recommend using the walrus operator in situations like this.
Additional context
See https://www.python.org/dev/peps/pep-0572/
The text was updated successfully, but these errors were encountered: