Attack a sacred Python Cow

Terry Reedy tjreedy at
Fri Jul 25 03:02:48 CEST 2008

Jordan wrote:

> I wish in retrospect I'd had the time, patience and focus to edit the
> initial post to make it more measured and less inflammatory, because
> its clear the tone

I will ignore that.

 > detracts from the argument I'm making, which I feel still stands.

class C():
   def f():
     a = 3

You made a complaint and an incomplete proposal identical to what others 
have proposed.  But here is where the idea always sinks.  Suppose as you 
propose 'self' is added to the arg list.  How is a mindless algorithm to 
decide whether to change a to 'self.a' to make it an attribute or leave 
it alone as a local variable?  Or would you abolish local vars from 
methods (which would slow them down)?

As near as I can see, any concrete detailed implementable proposal would 
be a more major change in Python or its implementation than 
'down-with-self'ers usually admit.

If the argument you refer to is instead that 'Explicit is better than 
Implicit' is a bit overused and inadequate as a technical response, then 
I agree.  But excuse me for being unsure ;-).

Terry Jan Reedy

More information about the Python-list mailing list