>     if (diff := x - x_base) and (g := gcd(diff, n)) > 1:
>          return g
>
>
I don't see the advantage in that succinctness:

g = special_gcd(x - x_base, n)

if g:

    return g


The code bases I work on constantly move towards having the next guy grok
what's going on just by reading the code.

It could also be:

if special_gcd(x - x_base, n) as g:

    return g

Cheers!

Juancarlo *Añez*
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to