2 ms·
I find the short example a strange choice. Sure, you can build a crazy expression which is hard to process / read / debug. But the change also enables this, whi
by viraptor 9y ago
I find the short example a strange choice. Sure, you can build a crazy expression which is hard to process / read / debug. But the change also enables this, which solves most problems raised and makes reading easier:
if diff := x - x_base:
if (g := gcd(diff, n)) > 1:
return g
Or even this, depending on preference:
if diff := x - x_base:
g = gcd(diff, n)
if g > 1:
return g