Unification of Methods and Functions

Terry Reedy tjreedy at udel.edu
Thu May 13 10:56:58 EDT 2004


"Antoon Pardon" <apardon at forel.vub.ac.be> wrote in message
news:slrnca6d58.1i9.apardon at trout.vub.ac.be...
> One could argue that all forms of methods and functions are unified.
> It is just that python does some magic so that the method you
> access from an object is not the actual function but the curried
> function with the object.

My view is similar: in Python, a method is a dressed up (wrapped) function.
'Unification of methods and functions' reads to me like 'unification of
dressed-up bodies and naked bodies'.  What would that mean?  One thing I
like about Python is that there is only function-body syntax and not a
separate, slightly different method-body syntax.  To me, having only one
type of code body *is* unification.  So it is hard for me to see what is
being proposed.  Introducing a syntax like '.var' that would only be
meaningful in a method and not a function would be dis-unification.

Terry J. Reedy







More information about the Python-list mailing list