Attack a sacred Python Cow

Nikolaus Rath Nikolaus at rath.org
Fri Jul 25 03:54:30 EDT 2008


Terry Reedy <tjreedy at udel.edu> writes:
> Torsten Bronger wrote:
>> Hallöchen!
>  > And why does this make the implicit insertion of "self" difficult?
>> I could easily write a preprocessor which does it after all.
>
> class C():
>   def f():
>     a = 3
>
> Inserting self into the arg list is trivial.  Mindlessly deciding
> correctly whether or not to insert 'self.' before 'a' is impossible
> when 'a' could ambiguously be either an attribute of self or a local
> variable of f.  Or do you and/or Jordan plan to abolish local
> variables for methods?

Why do you think that 'self' should be inserted anywhere except in the
arg list? AFAIU, the idea is to remove the need to write 'self' in the
arg list, not to get rid of it entirely.


Best,

   -Nikolaus

-- 
 »It is not worth an intelligent man's time to be in the majority.
  By definition, there are already enough people to do that.«
                                                         -J.H. Hardy

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C




More information about the Python-list mailing list