Does python support multi prototype.

Jorgen Grahn jgrahn-nntq at algonet.se
Wed Aug 4 21:49:30 CEST 2004


On Wed, 04 Aug 2004 10:20:53 -0400, Peter Hansen <peter at engcorp.com> wrote:
> Jorgen Grahn wrote:
...
>> I miss overloading in Python from time to time, but I can live without it.
>> It is, after all, closely tied to a type system which is desirable in C++
>> and Java, but not in Python.
> 
> (untested code, may be minor bugs)
...
> 
> If you _really_ miss it from time to time, then it's _really_
> easy to add it so that it's available in a fairly elegant fashion
> when you do need it.

Well, I don't _really_ miss overloading that much. Not enough to try to
squeeze it into Python when I know it's an idiom that doesn't really fit.

Your code was kind of elegant, but kind of misses the point with
overloading, I think.  At least, it's not anything I'd want to do in most
situations where overloading would have been nifty in C++.  IMHO.

/Jorgen

-- 
  // Jorgen Grahn <jgrahn@      ''If All Men Were Brothers,
\X/                algonet.se>    Would You Let One Marry Your Sister?''



More information about the Python-list mailing list