Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20118 > unrolled thread
| Started by | Ian <hobson42@gmail.com> |
|---|---|
| First post | 2012-02-09 23:09 +0000 |
| Last post | 2012-02-09 23:09 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Want to improve my code. Ian <hobson42@gmail.com> - 2012-02-09 23:09 +0000
| From | Ian <hobson42@gmail.com> |
|---|---|
| Date | 2012-02-09 23:09 +0000 |
| Subject | Want to improve my code. |
| Message-ID | <mailman.5619.1328828964.27778.python-list@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
Back to top | Article view | comp.lang.python
csiph-web