<div dir="ltr">Optimizing syntax for space makes sense for "mathematical" notation since it's commonly written by hand, but putting space above readability in a programming language design feels like a skewmorphism.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 11 May 2018 at 11:41 Jacco van Dorp <<a href="mailto:j.van.dorp@deonet.nl">j.van.dorp@deonet.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I dont really like "given".<br>
<br>
If we compare:<br>
<br>
if m given m = re.match(stuff):<br>
<br>
to<br>
<br>
if m := re.match(stuff)<br>
<br>
then I count 4+(name_length) more tokens and 2 more spaces. Since I<br>
believe := is perfectly clear, I don't see the reason for a far more<br>
verbose syntax.<br>
<br>
That all said, I would still prefer:<br>
<br>
if re.match(stuff) as m:<br>
<br>
which is exactly equal to the := in line length and parallels with.<br>
While that may -technically- be a different beast.<br>
For beginners the difference is really irrelevant, and you can just<br>
tell advanced people the full story(technically speaking the as in a<br>
with statement isn't an expression assignment, it's a part of the with<br>
statement, and it feeds in the value through the context manager<br>
machinery before binding it. Similar for the except statement.).<br>
<br>
But I've kind of given up on "as" (so no need to reply on that bit).<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>