PEP 572: Python assignment expressions has been accepted
This is unpythonic, breaking about half of these design rules:<p><a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Zen_of_Python" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Zen_of_Python</a><p>For anyone who hasn&#x27;t read the original PEP link, what do you suppose this does?  Guess its meaning:<p>1.<p><pre><code>    if (row := cursor.fetchone()) is None:
          raise NotFound
      return row
</code></pre>
2.<p>Next guess the meaning of this - what does it look like it does?<p><pre><code>  row = cursor.fetchone()
  if row is None:
      raise NotFound
  return row


</code></pre>
Answers:<p>The first does the second. The second doesn&#x27;t need explanation.  I literally don&#x27;t need to tell you what it does.<p>(The two examples are from the link.)<p>Now you might think that this means I&#x27;m against this PEP.<p>But actually [EDIT: because I know there is a VERY high bar to being accepted into Python] to me it means this is going to save an <i>incredible</i> amount of time - it must be very good indeed to be accepted.<p>So if they decided to adopt it - sure, I&#x27;ll use it.  And I bet it&#x27;s great in practice.<p>It&#x27;s also super explicit. If you don&#x27;t know what := does you will go look it up.<p>If Python is still driven by Python design philosophy and all that discussion, then this will be very helpful.  It surely had a very high threshold to meet.