Too many 'self' in python.That's a big flaw in this language.

Roy Smith roy at panix.com
Wed Jun 27 08:58:59 EDT 2007


faulkner <faulkner891 at gmail.com> wrote:
> http://www.voidspace.org.uk/python/weblog/arch_d7_2006_12_16.shtml#e584

I looked the "Selfless Python" idea described there, and I think it's a 
REALLY bad idea.  It's a clever hack, but not something I would ever want 
to see used in production code.  Sure, it saves a little typing, but it 
invokes a lot of magic and the result is essentially a new language and 
everybody who uses this code in the future will have to scratch their heads 
and figure out what you did.

Programs get written once.  They get read and maintained forever, by 
generations of programmers who haven't even been hired by your company yet.  
Doing some clever magic to save a few keystrokes for the original 
programmer at the cost of sowing confusion for everybody else in the future 
is a bad tradeoff.



More information about the Python-list mailing list