[Python-Dev] Minidom and Unicode
M.-A. Lemburg
mal@lemburg.com
Mon, 03 Jul 2000 11:36:18 +0200
Fredrik Lundh wrote:
>
> mal wrote:
> > > (strings are strings are strings, etc)
> >
> > -1: This breaks code, since it is expected that PyObject_Str()
> > returns a string object.
>
> unicode strings are also strings, right?
Well, I usually refer to them as Unicode objects to make it
clear that they are different from the standard notion of a
string in Python.
If we were to use classes for Python basic type I would
make them have the same base class though...
> the interesting question here is to figure out who's expecting that,
> and figure out if that code can be changed.
We might proceed in that direction for Py3K, but I don't
think it's a good idea to make such changes just now.
IMHO, it's better to provide other means of getting at the Unicode
data, e.g. instances could provide a __unicode__ method
hook which the builtin unicode() queries and then uses to convert
to Unicode.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/