styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Clarification needed regarding the use of the Walrus Operator

Open diogofrosario opened this issue 11 months ago • 1 comments

Hello,

I noticed that the current version of the Python style guide does not mention the Walrus Operator (:=), which was introduced in Python 3.8. I believe it would be beneficial to include a section discussing this operator, as it can impact code readability and maintainability. Are there any emerging standards or agreed good & bad practices for Walrus Operators that could be added to your python style guide? If you don't have anything in place maybe you can consider adopting the PEP-572 style guide recommendations as well as the examples provided by Tim Peters in Appendix A.

Thank you for considering this suggestion!

Best regards, Diogo Rosário

diogofrosario avatar Dec 09 '24 16:12 diogofrosario

@jeremyhylton @nathanielmanistaatgoogle @shanel-at-google

vapier avatar Dec 09 '24 16:12 vapier