On 04/23/2018 06:42 PM, Chris Jerdonek wrote:
On Mon, Apr 23, 2018 at 4:54 PM, Greg Ewing wrote:
Tim Peters wrote:
if (diff := x - x_base) and (g := gcd(diff, n)) > 1:
return g
My problem with this is -- how do you read such code out loud?
It could be--
"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 define as x - x_base, and g, which ....." etc.
Thanks, Chris J.
For myself, I can read that as
"if diff, which is x - x_base, and g, which is ..."
That works for me.
Changing my vote to
+1 (but only for simple name bindings)
--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com