[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

Talin talin at acm.org
Tue May 1 18:13:29 CEST 2007

Phillip J. Eby wrote:
> Proceeding to the "Next" Method
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> If the first parameter of an overloaded function is named
> ``__proceed__``, it will be passed a callable representing the next
> most-specific method.  For example, this code::
>      def foo(bar:object, baz:object):
>          print "got objects!"
>      @overload
>      def foo(__proceed__, bar:int, baz:int):
>          print "got integers!"
>          return __proceed__(bar, baz)

I don't care for the idea of testing against a specially named argument. 
Why couldn't you just have a different decorator, such as 
"overload_chained" which triggers this behavior?

-- Talin

More information about the Python-3000 mailing list