On Thu, 26 Apr 2018 22:25:09 +0300 Serhiy Storchaka <storch...@gmail.com> wrote: > > f(b=2, *[1]) is surprised in two ways: > > 1. Argument values are passed not in order. The first value is assigned > to the second parameter, and the second value is assigned to the first > parameter.
I don't find it that surprising. If you write f(b=2, a=1), you are also passing arguments "not in order", but it still looks ok to me. > 2. Argument values are evaluated not from left to right. This > contradicts the general rule that expressions are evaluated from left to > right (with few known exceptions). Well... If you have code that relies on that rule, I would agree it's brittle code and should be rewritten differently (perhaps by assigning to temporary variables explicitly). Regards Antoine. _______________________________________________ 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