I wrote a long anwser to Python decoratorslong anwser to Python decorators. I've shorten it a little since, but you can see the original problem rolling back to the fourth revision. It's get truncated at the end. It's not just on the HTML side, it's on the plain text side as well.
Since it's long and contain links, it may be related to :