On 05.07.2018 15:20, Victor Stinner wrote:
Hi,
My work (*) in the "Assignment expression and coding style: the while
True case" thread helped me to understand something about the
*intended* scope.
While technically, assignment expressions keep the same scoping rules
than assignment statements,
After "Assignment expression and coding style: the while True case",
here is the part 2: analysis of the "if (var := expr): ..." case.
2018-07-05 14:20 GMT+02:00 Victor Stinner :
> *intended* scope.
I generated the giant pull request #8116 to show where I consider that
"if (var := expr): ..." wou
On 2018-07-05 16:07, Victor Stinner wrote:
2018-07-05 15:14 GMT+02:00 Gustavo Carneiro :
I don't know if you're trying to propose something clever here, like "if (x
:= func()):" would assign to 'x' only inside the "then" body of the if, but
IMHO that would be a terrible idea:
I don't propose t
2018-07-05 15:14 GMT+02:00 Gustavo Carneiro :
> I don't know if you're trying to propose something clever here, like "if (x
> := func()):" would assign to 'x' only inside the "then" body of the if, but
> IMHO that would be a terrible idea:
I don't propose to change the PEP 572. I'm trying to expla
On Thu, Jul 5, 2018 at 11:14 PM, Gustavo Carneiro wrote:
> On Thu, 5 Jul 2018 at 13:43, Victor Stinner wrote:
>>
>> Hi,
>>
>> My work (*) in the "Assignment expression and coding style: the while
>> True case" thread helped me to understand something about the
>> *intended* scope.
>>
>> While tec
On Thu, 5 Jul 2018 at 13:43, Victor Stinner wrote:
> Hi,
>
> My work (*) in the "Assignment expression and coding style: the while
> True case" thread helped me to understand something about the
> *intended* scope.
>
> While technically, assignment expressions keep the same scoping rules
> than a
Hi,
My work (*) in the "Assignment expression and coding style: the while
True case" thread helped me to understand something about the
*intended* scope.
While technically, assignment expressions keep the same scoping rules
than assignment statements, writing "if (x := func()): ..." or "while
(x