05.02.21 09:51, Paul Sokolovsky пише: > a0 = 0 > b0 = 10 > while ((a1, b1) := phi([a0, a2], [b0, b2]))[0] < 5: > a2 = a1 + 1 > b2 = b1 + 1
Such code quickly becomes unreadable. Especially if in real code function has additional arguments and names are longer that 2-3 characters. The following code is not much larger but more clear and extensible: a0 = 0 b0 = 10 while True: a1, b1 := phi([a0, a2], [b0, b2])) if b1 >= 5: break a2 = a1 + 1 b2 = b1 + 1 _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/6YILI7IW3HYPMZSPH3DJYWMNHJKZ2CXN/ Code of Conduct: http://python.org/psf/codeofconduct/