Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20118 > unrolled thread

Want to improve my code.

Started byIan <hobson42@gmail.com>
First post2012-02-09 23:09 +0000
Last post2012-02-09 23:09 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Want to improve my code. Ian <hobson42@gmail.com> - 2012-02-09 23:09 +0000

#20118 — Want to improve my code.

FromIan <hobson42@gmail.com>
Date2012-02-09 23:09 +0000
SubjectWant 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web