[XML-SIG] funny behaviour with Document.createTextNode

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 5 Jun 2001 21:06:21 +0200


> This will give you a nice traceback, ending with:
>   File "/usr/lib/python1.5/site-packages/xml/dom/ext/Printer.py", line
> 262, in visitText
>     text = string.strip(text) and text
> TypeError: read-only character buffer, tuple

Depends on your Python version. In 2.x, you get

AttributeError: 'tuple' object has no attribute 'strip'

since string.strip(x) is now x.strip(), due to the new string methods.

Regards,
Martin