Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Want to improve my code.

12 views
Skip to first unread message

Ian

unread,
Feb 9, 2012, 6:09:07 PM2/9/12
to pytho...@python.org
Hi all,

I'm using lxml etree, and have written a routine to remove nodes in the
parsed tree.

Typically, I load html, and remove <font> tags, so I am moving the font
tags children up and moving the text and tail data about. The code of
the deleteElem routine is here http://snipt.org/GSoo0

It troubles me that there is so much repetition in the lines that call
joiner.

How can I improve the code?

Regards

Ian
0 new messages