Unification of Methods and Functions

David MacQuigg dmq at gain.com
Tue May 25 06:50:08 EDT 2004


On 25 May 2004 10:30:03 GMT, Antoon Pardon <apardon at forel.vub.ac.be>
wrote:

>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.

I've started a section on my webpage at
http://ece.arizona.edu/~edatools/Python/Examples 
for those that feel we need a completely different approach to
introducing OOP.  If you put together some examples of what you mean
by the above, I'll add them to my webpage.

-- Dave




More information about the Python-list mailing list