Python 3.8 - Walrus operator

preview_player
Показать описание
In september 2019 we will have the 3.8 version of Python with this new feature: the Walrus operator.
Рекомендации по теме
Комментарии
Автор

I finally know that True is greater than 50!Jokes aside, I don't think this is gonna be all that useful.The minuscule save of one line of code in exchange for more complex code and potential errors that can be hard to find isn't worth it.I know we all love to make short and concise code in our small pet projects (I do it all the time), but when it comes to real production, simpler code will almost always win over minuscule saves like this.I do however see some potential use-cases for this in while loops, and we'll have to see what clever ways the community finds to utilize this.

jskallebak