On 15/12/20 15:26, Grant Edwards wrote: > On 2020-12-15, Mark Polesky via Python-list <python-list@python.org> wrote: > >> I see. Perhaps counterintuitive, > I guess that depends on what programming language you normally think > in. Python's handling of function parameters is exactly what I > expected, because all of the previous languages I used did the same > thing. > > Purely out of curiosity, what language had you been using that behaved > otherwise? >
R comes to mind; arguments can even be defined as functions of other arguments, and this is evaluated symbolically at call time: """ > f = function(x, y = 2 * x) { y } > f(1) [1] 2 > f(2) [1] 4 > f(y = 3) [1] 3 """ MMR... -- https://mail.python.org/mailman/listinfo/python-list