Bengt Richter wrote: > On Mon, 08 Aug 2005 16:18:50 -0400, Nicolas Fleury <[EMAIL PROTECTED]> wrote: >>I wrote the PEP to see if was the only one that would benefit from >>generic types *before* having optional static typing in the language. >> >>It seems I'm the only one;) >> >>According to blog entry 86641, Guido himself is prototyping with >>__getitem__. However, I cannot do the same, because the framework I use >>is much more complete and keyword arguments are a must. >> > Here is a decorator object to set up function call dispatch according to type. > It only uses positional arguments, but could be fleshed out, I think. > Not tested beyond what you see ;-)
That's nice. Guido also posted this multimethods solution: http://www.artima.com/weblogs/viewpost.jsp?thread=101605 The only thing I was saying it that I can use generic types in Python right now (and I do), by using (), but I can't with what will probably be the syntax in future, i.e. using []. Regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list