On Tue, Apr 17, 2018 at 5:42 AM, Mikhail V <mikhail...@gmail.com> wrote:
> On Mon, Apr 16, 2018 at 8:42 PM, Chris Angelico <ros...@gmail.com> wrote:
>> On Mon, Apr 16, 2018 at 11:05 PM, Mikhail V <mikhail...@gmail.com> wrote:
>>
>> Here are the three most popular syntax options, and how each would be 
>> explained:
>>
>> 1) "target := expr" ==> It's exactly the same as other forms of
>> assignment, only now it's an expression.
>> 2) "expr as name" ==> It's exactly the same as other uses of "as",
>> only now it's just grabbing the preceding expression, not actually
>> doing anything with it
>> 3) "expr -> name" ==> The information went data way.
>
>
> As I initially said, I just don't find this choice list fair.
> and it should be:
>
> 1) "target = expr"  (which would be first intuitive idea from user's PoV,
> and if can't be made then explained to Python people why not)

That one is dealt with in the PEP. It is not an option.

> 2) "target := expr" (as probably best close alternative)

Yep, got that one.

> 3) "target ? expr" (where ? is some other word/character -  IIRC
>   "target from expr" was proposed once)

... which isn't specific enough to be a front-runner option.

> That's it.
> But well, if I compare to your choice list - there is ":=" option you
> have as well :)

Yes. I'm not sure what's unfair about the options I've given there.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to