[Python-ideas] PEP 572: Assignment Expressions (post #4)

Evpok Padding evpok.padding at gmail.com
Thu Apr 12 03:06:40 EDT 2018


On 11 April 2018 at 23:09, Brendan Barnwell <brenbarn at brenbarn.net> wrote:

> On 2018-04-11 11:05, David Mertz wrote:
>
>> How about this, Brendan?
>>
>> _, x1, x2 = (D := b**2 - 4*a*c), (-b + sqrt(D))/2, (-b - sqrt(D))/2
>>
>> I'm not sure I love this, but I don't hate it.
>>
>
>         That's clever, but why bother?  I can already do this with
> existing Python:


Well, you were the one who suggested using an assignment expression for
that case.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180412/cee727c9/attachment.html>


More information about the Python-ideas mailing list