[Guido] >> I’ve never been able to remember whether (f@g)(x) means f(g(x)) or g(f(x)). >> That pretty much kills the idea for me.
[David Mertz] > Well, it means whichever one the designers decide it should mean. But > obviously it's a thing to remember, > and one that could sensibly go the other way. > > On the other hand, when I showed an example using filter() a couple days ago, > I had to try it to remember whether > the predicate or the iterable came first. Lots of such decisions are pretty > arbitrary. Best I know, f@g applies g first in every language that implements a composition operator, and in mathematics. While that may be arbitrary, it's easy to remember: (f@g)(x) "looks a heck of a lot more like" f(g(x)) than g(f(x)) because the former leaves the identifiers in the same order. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6C337WG4GVPBLT2V6VZ3IVMX42BOJBRW/ Code of Conduct: http://python.org/psf/codeofconduct/