3 ms·
In Python, the "." in "target . method" is an infix operator. Note that the "(" in (a, b) is also an operator. (There is some special parsing because otherwis
by anamax 2y ago
In Python, the "." in "target . method" is an infix operator.
Note that the "(" in (a, b) is also an operator. (There is some special parsing because otherwise you could do things like args = (1, 2, b=3); target.method args.)
As to whether <thing from target.method><thing from (a, b)> is postfix, I'm not sure how you get there. Yes, there's an implicit funcall at the end, but there's something similar with (+ a b) or ((. target method) (arglist a b)) and we wouldn't call them postfix.
- munificent 2y agoYou're right. Function application is essentially an infix `(` operator. Not sure how I got that wrong.