On Mon, Apr 16, 2018 at 11:11 AM Ned Batchelder <n...@nedbatchelder.com> wrote:
> On 4/16/18 1:42 PM, Chris Angelico wrote: > > 3) "expr -> name" ==> The information went data way. > > > > So either you take a parallel from elsewhere in Python syntax, or you > > take a hopefully-intuitive dataflow mnemonic symbol. Take your pick. > > My problem with the "->" option is that function annotations already use > "->" to indicate the return type of a function. This is an unfortunate > parallel from elsewhere in Python syntax, since the meaning is > completely different. > > ":=" is at least new syntax. > > "as" is nice in that it's already used for assignment, but seems to be > causing too much difficulty in parsing, whether by compilers or people. > > FWIW - We used "as" in our Python C++ binding interface description language in CLIF to denote renaming from the original C++ name to a new name in Python - effectively an assignment syntax. https://github.com/google/clif/blob/master/clif/python/primer.md I currently have a "-0" opinion on the entire PEP 572 as I don't buy that assignments within expressions are even a good thing to have in the language. #complexity - Think of people learning the language. -gps
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/