[I18n-sig] Re: Python Character Model

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 8 Feb 2001 20:29:36 +0100


> And if they read in a file from a Frenchmen then they get random Russian
> characters on their screen. Or they crash the third-party software
> because it couldn't decode properly. Or ...
> 
> This is what we need to move away from.

Move-away-from, perhaps. Outright force moving by breaking people's
code, no.

> Surely you agree with me that it is inappropriate for a user to
> *expect* a DOM implementation to pass on binary data
> unmolested. That some particular DOM may do so (like minidom) is
> probably just a performance optimizatoin quirk that could go away at
> any time. Why would we go out of our way to support people making
> this mistake?

Because of backwards compatibility. Breaking people's programs is not
good - even if they are using a style or an algorithm that you
despise.

> In another message you admitted that the codec mechanism is somewhat
> user unfriendly...so I hope we agree that we need something better.

No, I admitted that it is inconsequential if read as English. It is no
more or less friendly than a module that's called, say, file, so you'd
use file.open. In either case, the user will have to learn what to use.

Many Python users won't guess the right meaning into codec, just as
many people won't guess what "modem" stands for - yet they are fully
capable of using it (despite its demodulating nature :).

Regards,
Martin