Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20118
| Date | 2012-02-09 23:09 +0000 |
|---|---|
| From | Ian <hobson42@gmail.com> |
| Subject | Want to improve my code. |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5619.1328828964.27778.python-list@python.org> (permalink) |
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Want to improve my code. Ian <hobson42@gmail.com> - 2012-02-09 23:09 +0000
csiph-web