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

Toby Dickenson tdickenson@geminidataloggers.com
Thu, 08 Feb 2001 15:33:48 +0000


On Thu, 8 Feb 2001 07:16:01 -0800 (PST), Paul Prescod
<paulp@ActiveState.com> wrote:

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

I mentioned some other desirable differences too:

>I would want to avoid the need for a 2.0-style 'default encoding', so I
>suggest it shouldnt be possible to mix this type with other strings:
>
>>>> "1"+b"2"
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>TypeError: cannot add type "binary" to string
>>>> "3"=3D=3Db"3"
>0

Without a default encoding would need to change its str() too.

Toby Dickenson
tdickenson@geminidataloggers.com