[Python-Dev] Re: "groupby" iterator

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Dec 3 21:36:54 EST 2003

"Phillip J. Eby" <pje at telecommunity.com>:

> Ironically, it would be easy to do this with generic functions, since one 
> would simply define a methods for the case 'math.sin(Voodoo)' that returns 
> lambda x: math.sin(x).

> (Hm.  This gives me an entirely unrelated idea about how to unify object 
> methods and generic functions in Python using "curried 
> generics".  Interesting.  And the Voodoo() aka 'arg()' concept could be 
> applied to predicate dispatching as well.)

If we go much further along this road, we're going to end
up re-implementing the whole Python interpreter using
threaded code!

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list