On Wed, May 9, 2018 at 3:44 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > On Tue, 08 May 2018 22:48:52 -0500, Python wrote: >> I've always felt that this mentality was insulting to the programmer: >> "You're too stupid to get this right." Sure, I've created that bug in >> other languages (or rather its inverse) but not since college. You make >> it a few times, you go nuts debugging it, you learn what it is, you >> never do it again. > > And fortunately we don't have to deal with a steady stream of new > programmers learning the language and making newbie errors, right? > > If all programmers were as awesome as you and never made typos, the world > would be a better place. But we know from experience that even > experienced C programmers can make this mistake by accident.
Yes, and I'd go further: I *am* too stupid to get this right. That's why I have an editor that highlights certain words. (My current editor colours every Python standard library module name, so if I happen to create a variable called "time", it'll make it really obvious that I am now shadowing an importable module. Or, as I recently did, "sched".) That's why Python gives me tracebacks that show me exactly where I messed up. That's why my code is full of debugging checks, comments, and other tools to help me track down my mistakes after I make them. Because I *will* make mistakes. I will make a LOT of mistakes. And I am not going to try to pretend that I don't. ChrisA -- https://mail.python.org/mailman/listinfo/python-list