Some bugs you chase are really strange. Just take a look at the following Python script:


 import re

r = re.compile('^', re.M)

src = '''<html> <head> <title>Logviewer</title> </head> <body> <div> <h1>Titel</h1> </div> <div> {{}}
 {% block content %}
 {% endblock %}
 </div> </body> </html> '''

for match in r.finditer(src):
 print match.start()

Looks quite harmless - it just returns the positions of the newlines (yes, I know, you do this differently - the source is not mine). The script has an infinite loop on the last, closing newline under Python 2.3. If you remove it (i.e., paste the """ directly behind the last tag without a line break), the script works. Under Python 2.4, both variants work. And you have to chase after things like that...

Do I really need to emphasize that this little snippet of code was hidden in a larger pile of code, or?