[Python-Dev] Minidom and Unicode
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Mon, 3 Jul 2000 09:29:23 +0200
> the repository has been updated.
In what way?
Python 2.0b1 (#1, Jul 3 2000, 09:12:07) [GCC 2.95.2 19991024 (release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
>>> class X:
... def __repr__(self):
... if hasattr(self,"u"):
... return u'\u30b9'
... else:
... return u'hallo'
...
>>> x=X()
>>> x
hallo
>>> x.u=1
>>> x
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: __repr__ returned non-string (type unicode)
> no need to change minidom.
The need still appears to exist, both for minidom.Element (KATAKANA
LETTER SU is a letter, and thus a valid tag name), as well as
minidom.Text. A string is a string is a string.
Regards,
Martin