Tim Peters wrote:
To my eyes, this is genuinely harder to follow, despite its relative brevity:

        while total != (total := total + term):

Not surprising, since there are at least two deeper levels
of subtlety at play:

1. total isn't just naming a subexpression, it's being
rebound to something that depends on its previous value.

2. Order of evaluation is being relied on to ensure that
the new value of total is compared to its old value.

--
Greg

_______________________________________________
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

Reply via email to