[Python-Dev] type categories

Greg Ewing greg@cosc.canterbury.ac.nz
Thu, 15 Aug 2002 11:51:43 +1200 (NZST)


Andrew Koenig <ark@research.att.com>:

> In the Python domain, I imagine something like this:
> 
>         def f(arg: Category1):
>                 ....
>         or  f(arg: Category2):
>                 ....
>         or  f(arg: Category3):
> 
> I would like the implementation to try each version of f until it
> finds one that passes the constraints

Would all the versions of f have to be written together
like that? I think when most people talk of multiple
dispatch they have something more flexible in mind.

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