Method overloading?

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Thu Feb 15 08:00:07 EST 2007


On 15 fév, 09:32, "Troy Melhase" <troy.melh... at gmail.com> wrote:
> On 14 Feb 2007 20:54:31 -0800, placid <Bul... at gmail.com> wrote:
>
> > class Test:
> >     def __init__(self):
> >         pass
>
> >     def puts(self, str):
> >         print str
>
> >     def puts(self, str,str2):
> >         print str,str2
>
> you might look into the overloading module and its decorator.  source
> is in the sandbox:
>
> http://svn.python.org/view/sandbox/trunk/overload/overloading.py
>
Or have a look at Philip Eby's dispatch package, which is kind of
overloading on steroids...




More information about the Python-list mailing list