Unfortunately, despite batting to with HTML entities for less than and the like, and even changing all spaces to non-breaking spaces*, the best I seem to be able to do is:
obj = MyCls()
It starts out looking OK, but once I preview it, or publish it, Blogger just throws away everything after the first space up to the closing angle. Who can tell me what I am doing wrong? Or is Blogger being unfair.
* don't even think about blogging the actual entity codes: they'll be mangled too.
[The program will run, producing slightly different output, under Python 2. I suspect Blogger will mangle that output too]