Piet van Oostrum <[EMAIL PROTECTED]> wrote:

>>>>>> Ben Finney <[EMAIL PROTECTED]> (BF) wrote:
> 
>>BF> The latter two statements are equivalent. The
>>'instance.method(args)' BF> syntax is just sugar for
>>'Class.method(instance, args)'. 
> 
> It is more than just syntactic sugar because the Class is derived from
> the instance at runtime. 

Other differences that mean it isn't just sugar:

you can save the bound method created by 'instance.method' but not with the 
expanded version.

The equivalence depends on the type of 'method', other expansions are 
possible: e.g. Class.method(Class, args) or Class.method(args) or invent 
your own.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to