user-defined operators: a very modest proposal

Mike Meyer mwm at
Wed Nov 23 00:43:46 CET 2005

"Steve R. Hastings" <steveha at localhost.localdomain> writes:

> I have been studying Python recently, and I read a comment on one
> web page that said something like "the people using Python for heavy math
> really wish they could define their own operators".  The specific
> example was to define an "outer product" operator for matrices.  (There
> was even a PEP, number 211, about this.)
> I gave it some thought, and Googled for previous discussions about this,
> and came up with this suggestion:
> User-defined operators could be defined like the following: ]+[

See <URL: > for
some better suggestions, including an implementation in Python.

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list