Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Tim Peters
[Antoine Pitrou ] > ... > Having to break things out over multiple lines is a fact of life, if > only for readability when implementing (and maintaining!) non-trivial > processing routines. It's a good thing to be used to it, and to learn to > choose good names for intermediate variables. Well, th

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Chris Angelico
On Tue, Apr 24, 2018 at 5:12 PM, Greg Ewing wrote: > Chris Jerdonek wrote: > if (diff := x - x_base) and (g := gcd(diff, n)) > 1: > > >> "if diff, which we let equal x - x_base, and g, which ..." or >> "if diff, which we set equal to x - x_base, and g, which " or >> "if diff, which we def

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Greg Ewing
Stephen J. Turnbull wrote: Neologisms are usually written in the other order: "dead on arrival (DOA, for short)." ;-) Maybe we can make use of that? if (x - x_base) (diff) and gcd(diff, n) (g) > 1: That doesn't work, because the (...) look like function calls. But what if we used a differe

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Greg Ewing
Chris Jerdonek wrote: if (diff := x - x_base) and (g := gcd(diff, n)) > 1: "if diff, which we let equal x - x_base, and g, which ..." or "if diff, which we set equal to x - x_base, and g, which " or "if diff, which we define to be x - x_base, and g, which " or "if diff, which we defin

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Antoine Pitrou
On Tue, 24 Apr 2018 16:38:39 +1000 Chris Angelico wrote: > On Tue, Apr 24, 2018 at 4:27 PM, Antoine Pitrou wrote: > > On Tue, 24 Apr 2018 01:06:30 -0500 > > Tim Peters wrote: > >> > >> > - does it make Python easier to learn and teach? > >> > >> By whom? Almost no addition has ever made a

<    1   2