Unification of Methods and Functions

Michael Walter cm at leetspeak.org
Fri Apr 30 19:53:50 CEST 2004


David MacQuigg wrote:
> [...]
Pardon my ignorance, but I'm not quite sure how this unificates methods 
and functions at all.

In my eyes, unification would remove method definitions from the "class" 
scope or make it simply syntactic sugar for:

def my_method(SomeClass self):
   ...

(instead of:
class SomeClass:
   def my_method(self):
     ...)

This would also add the possibility to provide multiple dispatch by 
simply allowing a "type hint" for every parameter at every position.

Cheers,
Michael



More information about the Python-list mailing list