[Python-Dev] Unifying Long Integers and Integers: baseint

"Martin v. Löwis" martin at v.loewis.de
Thu Aug 12 08:26:40 CEST 2004


Guido van Rossum wrote:
> Anyway, if we really do have enough use cases for byte array literals,
> we might add them.  I still think that would be confusing though,
> because byte arrays are most useful if they are mutable: and then we'd
> have mutable literals -- blechhhh!

I see. How would you like byte array displays then? This is the approach
taken in the other languages: Everytime the array display is executed, a
new array is created. There is then no problem with that being mutable.

Of course, if the syntax is too similar to string literals, people might
be tricked into believing they are actually literals. Perhaps

   bytes('G','E','T')

would be sufficient, or even

   bytes("GET")

which would implicitly convert each character to Latin-1.

Regards,
Martin


More information about the Python-Dev mailing list