Why no warnings when re-assigning builtin names?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Aug 16 21:29:30 EDT 2011


Philip Semanchuk wrote:


> I think Python does lots of beneficial hand-holding. Garbage collection is
> a good example. $DIETY knows, people have been struggling with manual
> memory management in C and its ilk for a long time. Even though there are
> good tools to help, memory leaks still happen. Python increases our
> productivity by allowing us to forget about manual memory management
> altogether. I can do it with tools like valgrind, but Python's makes the
> point moot. Is that hand-holding? If so, I'm all for it.

Hand-holding is not a well-defined term. According to Mel, garbage
collectors would be hand-holding designed for soft nellies.

http://www.cs.utah.edu/~elb/folklore/mel.html

But Mel would probably make his own nails rather than buy them from the
hardware store too. To some secret recipe involving rare metals that most
people have never even heard of. And use a hammer forged from a single
piece of meteor iron, shaped to fit his hand precisely. And it would be too
heavy for mortals to lift.

Of course the term "hand-holding" is a pejorative. The implication is that
the person needing the hand-holding is like a child who needs somebody to
hold their hand while they cross the road. Adults are supposed to know
better (if only it were true in real life!). On the other hand, a real
adult knows their limitations, and if you need a bit of hand-holding in a
certain area of your life, so be it. 

Some errors aren't exactly a matter of inexperience and poor judgement, and
so everyone can benefit from guard rails, seat belts and garbage
collection. In that case, it isn't hand-holding, because there's no
expectation that you should grow up from it. Even Donald Knuth probably
would get benefit from a good garbage collector.

I have no objection to lint tools. But separation of concerns should apply:
the Python compiler should just compile what I tell it to, the linter
should warn me if I'm running with scissors.


-- 
Steven




More information about the Python-list mailing list