[XML-SIG] Re: [Python-Dev] Minidom and Unicode

Paul Prescod paul@prescod.net
Sat, 01 Jul 2000 08:09:20 -0500


"M.-A. Lemburg" wrote:
> 
> Note that __repr__ has to return a string object (and IIRC
> this is checked in object.c or abstract.c). The correct way
> to get there is to simply return str(...) or to have a
> switch on the type of self.tagName and then call .encode().
> ...

I prefer the former solution and unless someone screams I will check
that in in a few hours.

Why can't repr have a special case that converts Unicode strings to
"Python strings" automatically. This case is going to byte other people.

> Ok. I believe tagName will be always a Unicode object (as mandated by
> the DOM API), so I propose patch 100706
> (http://sourceforge.net/patch/?func=detailpatch&patch_id=100706&group_id=5470)

I would like Unicode usage to be a userland option for reasons of
performance and backwards compatibility.

-- 
 Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it 
gave rise made modern science possible, but it was the algorithm that 
made the modern world possible.
	- The Advent of the Algorithm (pending), by David Berlinski