Attack a sacred Python Cow
Torsten Bronger
bronger at physik.rwth-aachen.de
Thu Jul 24 13:34:15 EDT 2008
Hallöchen!
Sebastian \"lunar\" Wiesner writes:
> Torsten Bronger <bronger at physik.rwth-aachen.de>:
>
>> Bruno Desthuilliers writes:
>>
>>> Torsten Bronger a écrit :
>>>
>>>> Bruno Desthuilliers writes:
>>>>
>>>> [...]
>>>>
>>>> Just like this. However, the compiler could add "self" to
>>>> non-decorated methods which are defined within "class".
>>>
>>> What's defined within classes are plain functions. It's actually
>>> the lookup mechanism that wraps them into methods (and manage to
>>> insert the current instance as first argument).
>>
>> And why does this make the implicit insertion of "self"
>> difficult? I could easily write a preprocessor which does it
>> after all.
>
> Who said, that it would be "difficult"? He just corrected your
> statement about definitions inside a class, and did not make any
> assumption about making "self" implicit.
If it is not the implementation, I don't see why the "definition
inside a class" matters at all. It can be realised as a
transformation of the syntax tree and would even be transparent for
the compiling steps after it.
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: torsten.bronger at jabber.rwth-aachen.de
More information about the Python-list
mailing list