Python 3K or Python 2.9?
Steve Holden
steve at holdenweb.com
Mon Sep 17 07:02:14 EDT 2007
TheFlyingDutchman wrote:
>> The other half of the confusion is cleared up by considering that
>> Python methods are ordinary functions that don't magically "know" in
>> which "class" context they are executing: they must be told via the
>> first parameter.
>>
>
> They can be told all they want by the compiler/runtime - implicitly -
> under-the-covers, out-of-sight.
>
I wish you would keep these deep insightful comments to yourself. Your
knowledge of the interpreter internals appears to be based on
examination by crystal ball.
You conveniently ignore the fact that the situation described by David
Trudgett (and, by the way, your quoting with no attributions is also
becoming tiresome very quickly) is a *design choice*, not a mistake.
It's done precisely to make an explicit reference to the instance
available to methods.
You also conveniently ignore the fact that changing tis would also
change other aspects of the language, such as the ability to graft
functions into instances and classes as methods.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Sorry, the dog ate my .sigline
More information about the Python-list
mailing list