Method or function?

Dale Strickland-Clark dale at out-think.NOSPAMco.uk
Sun Nov 5 07:32:17 EST 2000


"Alex Martelli" <aleaxit at yahoo.com> wrote:

>"Dale Strickland-Clark" <dale at out-think.NOSPAMco.uk> wrote in message
>news:9js40t8t9tcc0cqtg8h4lkg79kheqp6fca at 4ax.com...
>    [snip]
>> I was also curious about the new join() method which strikes me as
>> being the wrong way around. Join should be a method of sequences not
>> of the string that is placed between the elements.
>
>I guess you and I have a different viewpoint about what the
>"proper" role of a method is/should-be -- in a Python (or
>most other OO languages, i.e., without multi-dispatch)
>context.  For me, it's definitely not an issue of syntax
>sugar -- it's an issue of polymorphism.  Since I will
>be able to dispatch only on one specific "argument" (the
>object to which the method is applied), the crucial issue
>is that the method must belong to the specific object for
>which I might want to get polymorphic behaviour.
>
<Snip long explanation>

>
>
>Alex
>
>
Thats' very interesting and adds a whole new side to the argument that
I hadn't considered.

Thanks for taking the time to explain it.

I really wish I had the time to explore this properly.

--
Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants





More information about the Python-list mailing list