Re: ElementTree's Element substitution in Python 3

2009-07-24 Thread André
On Jul 24, 4:17 pm, Piet van Oostrum wrote: > > André (A) a écrit: > >A> I have a function to replace the content of an ElementTree Element by > >A> that of another one which works using Python 2 but not with Python 3. > >A> I get an assertion error. [SNIP] > >A> Traceback (most recent call

Re: ElementTree's Element substitution in Python 3

2009-07-24 Thread Terry Reedy
André wrote: I have a function to replace the content of an ElementTree Element by that of another one which works using Python 2 but not with Python 3. I get an assertion error. The function is as follows: def replace_element(elem, replacement): '''replace the content of an ElementTree Ele

Re: ElementTree's Element substitution in Python 3

2009-07-24 Thread Piet van Oostrum
> André (A) a écrit: >A> I have a function to replace the content of an ElementTree Element by >A> that of another one which works using Python 2 but not with Python 3. >A> I get an assertion error. The function is as follows: >A> def replace_element(elem, replacement): >A> '''replace t

Re: ElementTree's Element substitution in Python 3

2009-07-24 Thread André
Sorry for replying to myself ... the following seems to be a working solution to my original problem. On Jul 24, 2:54 pm, André wrote: > I have a function to replace the content of an ElementTree Element by > that of another one which works using Python 2 but not with Python 3. > I get an asserti

ElementTree's Element substitution in Python 3

2009-07-24 Thread André
I have a function to replace the content of an ElementTree Element by that of another one which works using Python 2 but not with Python 3. I get an assertion error. The function is as follows: def replace_element(elem, replacement): '''replace the content of an ElementTree Element by that of