Unification of Methods and Functions

Antoon Pardon apardon at forel.vub.ac.be
Tue May 25 06:30:03 EDT 2004


Op 2004-05-25, David MacQuigg schreef <dmq at gain.com>:
> On 25 May 2004 07:39:49 GMT, Antoon Pardon <apardon at forel.vub.ac.be>
> wrote:
>>
>>Well one possible view is that methods are just functions. The
>>difference being that it is not exactly the function as it
>>is defined in the class but as related function. Now I don't
>>know if trying to explain methods from this point of view
>>would be easier for students to understand and it may cause
>>confusions of its own. But I think this approach deserves
>>more attention you seem willing to give it.
>
> I don't feel I can make much improvement on Learning Python, 2nd ed.
> I think this is the same approach that you are talking about -
> functions first, then methods, one variation at a time.

I don't think so. The apprach I'm thinking of would
be about the following.

1) functions
2) bare classes (no methods)
3) higher order functions
4) show how higher order functions
   can result in method like beheviour
5) methods and show the connection with
   higher order functions.

-- 
Antoon Pardon



More information about the Python-list mailing list