I personally like the walrus operator, and don't really buy the criticisms.<br><br>"Can be used just for assignment (=), so confusing to beginners"<br>"There should be only one obvious way to do it"<br>Not an issue since it was accepted that := can't appear on a line by itself without (); the obvious way to do assignment is with =<br><br>"This is how the = operator worked in C and it was error-prone"<br>This was only error-prone in C because it was easy to mistype == as = (a common mistake for beginners to programming, since they expect = to have the same meaning as in mathematics), so that you would end up assigning in an if-check `if (x = 42)` instead of testing for equality; I don't think it's as easy to confuse := for = (you're not using := unless you know what it does).<br><br>"Simple is better than complex; Adds complexity in the name of reducing whitespace"<br>This vague objection can be said of basically any new language feature/abstraction; list comprehension, for loops, even functions; they all add complexity in the name of reducing whitespace. Doesn't mean they're not worth it. Be more specific about why the added complexity of the walrus operator (which is little IMO; it took &lt;8 minutes to explain it) outweighs the added usefulness.<br><br>"Not enough testing of how developers will use it"<br>This is true of any new language feature; you won't know how ordinary developers will use it until you actually add it to the language.<br>And even if we haven't done it, we can look at how other languages have done it. Other languages have a similar feature of being able to declare &amp; initialize a variable in a control-flow header; Swift lets you do `if let x = f() {`, Go lets you do `if x := f(); x != 0 {`, C++17 lets you do `if (int x = f(); x != 0)`; it generally worked fine in those languages, so I don't see why the same wouldn't be true in Python (although I admit that every language is unique; it might interact weirdly with other Python features in unexpected ways. But again, that risk is inherent in every new language feature).,(reply>), @Saeed Baig I'm totally with you on these examples. I've run into this exact situation countless times, and sometimes I've used the while True/break approach and sometimes I've used the duplicate assignment line. I've always lamented that I can't just do what the walrus operator allows. So to me, it just provides a simple solution for these awkward situations, and does so in an unobtrusive way.,(reply>), @William Baric Oh I agree. while-True-break is an ugly technique and you should normally use better variable names. The point I was just trying to demonstrate with this small (but real) example is a good use case for the walrus operator; without the walrus operator, Python programmers would have no other choice but to use the while-True-break technique.<br><br>Actually, I suppose another way to write the code would be to repeat the looping condition before the loop, something like this:<br>```<br>cur.execute('SELECT title, year FROM movies')<br>t = cur.fetchone()<br>while t != None:<br>    title, year = t<br>    print(f'{title} was made in {year}')<br>    t = cur.fetchone()<br>```<br>But I dislike this approach because `t = cur.fetchone()` is repeated twice, and the scope of `t` is now bigger than it needs to be, reducing clarity to me (is `t` only supposed to be used inside the while loop, or did the programmer intend to use it afterwards as well? With the walrus-operator-approach, the answer is obviously "only inside the while loop", but in this approach it's less clear).<br><br>The point I'm trying to make is that this is a case where the walrus-operator-approach is more readable than any other approach (assuming they're all using the same variable names ofc).,(reply>), @William Baric "The idea that an assignment returns a value is not intuitive. Beginners will have a hard time grasping the concept."<br>True, but Python isn't just a toy language for noobs; one of the great things about Python is that it's simple enough for beginners to learn it easily, but has more advanced features for more experienced developers (e.g. list comprehension). Beginners can stick to easy things they know, and when/if they're ready they can check out more niche features like the walrus operator.<br><br>"More importantly, packing instructions always make the code less readable"<br>Debatable; sometimes it does, sometimes it doesn't. For example, here's some code from one of my uni assignments, where we had to read from a database with sqlite3. The starter code looked something like this:<br>```<br>cur.execute('SELECT title, year FROM movies')<br>while True:<br>    t = cur.fetchone()<br>    if t == None:<br>        break<br>    title, year = t<br>    print(f'{title} was made in {year}')<br>```<br><br>I rewrote the code with the walrus operator like so:<br>```<br>cur.execute('SELECT title, year FROM movies')<br>while t := cur.fetchone():<br>    title, year = t<br>    print(f'{title} was made in {year}')<br>```<br><br>Which version is more readable, first or second? I'll admit readability is subjective, I won't criticize anyone who answers "first", but to me the second version is more readable. Not only is it shorter, but it better conveys the intent of how long we're looping for (better than while-True-break kludge).