On Thu, Jul 24, 2008 at 7:08 PM, Greg Ewing <[EMAIL PROTECTED]> wrote: > Fredrik Johansson wrote: > >> Anyway, it is easy to define pseudo-operators in Python; >> >> A *matrixmul* B >> A *dot* B >> A *cross* B >> A *elementwise* B > > Urg. This is another one of those recipes that I consider > is too clever for its own good. Very nice in theory, > but I would never use it in real life.
That's unfortunate ;), because it's available in Python today, and with the common local caching of globals, can be as short as 3 characters (M for matrixmul, D for dot, X for cross, E for elementwise). > What's more, it doesn't address the real problem at hand, > which is providing a notation for matrix multiplication > that is concise enough to be used *very* frequently -- > like multiple times in every line of code that manipulates > matrices. This is the first time anyone has mentioned "conciseness" in this thread. And what's a 3 character operator between friends? The "and" and "not" operators don't seem to be bothered by three characters. ;) - Josiah _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com