On 24 April 2018 at 08:12, Greg Ewing <greg.ew...@canterbury.ac.nz> 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 define to be x - x_base, and g, which ...." or >> "if diff, which we define as x - x_base, and g, which ....." etc. >> > > How about "being" as a keyword: > > if (diff being x - x_base) and (g being gcd(diff, n)) > 1: > return g > > An advantage is that you're not likely to be tempted to write > > diff being x - x_base > > on its own as a statement. > > I like this term, but I don't like having more reserved words. Or PEP can make it an official way to read := (z := x + y) is _called_ a binding expression. (z := x + y) _reads_ as "z being x + y" -- Ivan
_______________________________________________ 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