user-defined operators: a very modest proposal

Mike Meyer mwm at mired.org
Tue Nov 22 18:43:46 EST 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:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 > for
some better suggestions, including an implementation in Python.

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list