Stefan Behnel <[email protected]> writes: > > # Keep a charbuffer to handle the escapeFlag > > if self.contentModelFlag in\ > > (contentModelFlags["CDATA"], contentModelFlags["RCDATA"]): > Is the tuple > (contentModelFlags["CDATA"], contentModelFlags["RCDATA"]) > constant? If that is the case, I'd cut it out into a class member ...
I think the main issue for that function comes after that if statement. There is a multi-way switch on a bunch of different possible character values. I do agree with you that the first "if" can also be optimized. -- http://mail.python.org/mailman/listinfo/python-list
