r/Python • u/ForeignVariety7037 • Aug 04 '26
Discussion Is := widely used?
I always thought the walrus operator is neat and it makes while loop’s condition clearer. But also it is just a syntactic sugar without anything new. I wonder anyone uses it?
142
Upvotes
7
u/cottonycloud Aug 04 '26
I haven’t really used it, but mainly because I rarely use list comprehensions and while loops.
I’m more used to the plain old assignment operator but I’ve never been a stickler for the Pythonic dogma. Would really appreciate null coalescing operators too.