(1) This proposal serves well to eliminate repeated computations by
allowing what is an inline assignment to a temporary variable. But it
doesn't seem to make the case of None-aware operators any less verbose
than they would be otherwise.
Proposal:
value = ?it.strip()[4:].upper() if
On 02/18/2018 05:57 PM, Nick Coghlan wrote:
On 17 February 2018 at 02:31, Ethan Furman wrote:
On 02/15/2018 11:55 PM, Nick Coghlan wrote:
However, while I think that looks nicer in general, we'd still have to
choose between two surprising behaviours:
* implicitly delete the statement locals
On 17 February 2018 at 02:31, Ethan Furman wrote:
> On 02/15/2018 11:55 PM, Nick Coghlan wrote:
>> However, while I think that looks nicer in general, we'd still have to
>> choose between two surprising behaviours:
>>
>> * implicitly delete the statement locals after the
On 02/15/2018 11:55 PM, Nick Coghlan wrote:
On 16 February 2018 at 12:19, rym...@gmail.com wrote:
I don't know...to me this looks downright ugly and an awkward special case.
It feels like it combines reading difficulty of inline assignment with the
awkwardness of a magic word and the ugliness
On 16/02/18 02:06, Nick Coghlan wrote:
The recent thread on variable assignment in comprehensions has
prompted me to finally share
https://gist.github.com/ncoghlan/a1b0482fc1ee3c3a11fc7ae64833a315 with
a wider audience (see the comments there for some notes on iterations
I've already been
On 16 February 2018 at 18:36, Kirill Balunov wrote:
> What about (| val = get_value(x) |) assignment expression which will be True
> if success, and None if not?
>
> So it will be value = f() if (| f = calculate |) else default…The idea is
> inspired from C’s assignment,
What about (| val = get_value(x) |) assignment expression which will be True
if success, and None if not?
So it will be value = f() if (| f = calculate |) else default…The idea is
inspired from C’s assignment, but needs some special treatment for anything
which is False in boolean context.
With
On 16 February 2018 at 12:19, rym...@gmail.com wrote:
> I don't know...to me this looks downright ugly and an awkward special case.
> It feels like it combines reading difficulty of inline assignment with the
> awkwardness of a magic word and the ugliness of using ?. Basically,
I don't know...to me this looks downright ugly and an awkward special case.
It feels like it combines reading difficulty of inline assignment with the
awkwardness of a magic word and the ugliness of using ?. Basically, every
con of the other proposals combined...
--
Ryan (ライアン)
Yoko Shimomura,
The recent thread on variable assignment in comprehensions has
prompted me to finally share
https://gist.github.com/ncoghlan/a1b0482fc1ee3c3a11fc7ae64833a315 with
a wider audience (see the comments there for some notes on iterations
I've already been through on the idea).
== The general idea ==
10 matches
Mail list logo