[I18n-sig] Re: Pre-PEP: Proposed Python Character Model

Fredrik Lundh fredrik@effbot.org
Sun, 11 Feb 2001 11:46:09 +0100

> I really like the idea of the
> b"..." prefix
> Is anyone opposed?


> 1. [file]?open(filename, encoding, ...)

you mean (?:file)?open, right?

I still think we can reuse the builtin "open" primitive (and
don't forget the text vs. binary mode issue -- binary files
never have encodings).

> 2. b"..."

-0 (I'm sceptical)

> 3. an encoding declaration at the top of files


> 4. that concatenating Python strings and Unicode strings should do the
> "obvious" thing for charcters from 127-255 and nothing for characters
> beyond.


> 5. a bytestring type that behaves in every way shape and form like our
> current string type but has a different type() and repr().

almost: it shouldn't implement text-related method.  isupper, upper,
etc doesn't make sense here.

(but like in SRE, the *source* code should be reused)

Cheers /F