A Python coding mistakeThere is a world of difference between ' (Repetitive code is especially prone to this sort of slip-up for me. Unfortunately, one of my bad coding habits is quietly growing into such code by accident.) Interestingly enough, pychecker doesn't produce any warnings for this. This isn't its fault as such; although it tries to look for them, it works from the compiled bytecodes and since Python 2.3, the bytecode compiler optimizes away the constant conditions. Pylint didn't detect it either, although it complained about a lot of other things by default (enough that I can't imagine using it on a real project, especially since I use tabs for indentation). (This exact mistake accidentally shut down commenting here for about half a day. My apologies to anyone caught in the accident, which would have given peculiar error messages.) |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |