On 25.06.2018 2:30, Greg Ewing wrote:
Guido van Rossum wrote:
Greg seem to be +0 or better for (a)
Actually, I'm closer to -1 on (a) as well. I don't like := as a
way of getting assignment in an expression. The only thing I would
give a non-negative rating is some form of "where" or "given".
"as" was suggested even before is became a keyword in `with'. ( if
(re.match(regex,line) as m) is not None: <do smth> )
The only objective objection I've heard is it's already used in `import'
and `with' -- but that's perfectly refutable.
Brief summary of reasons for disliking ":=":
* Cryptic use of punctuation
* Too much overlap in functionality with "="
* Asymmetry between first and subsequent uses of the bound value
* Makes expressions cluttered and hard to read to my eyes
--
Regards,
Ivan
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com