[Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?] (original) (raw)
Neil Schemenauer nas at arctrix.com
Tue Feb 14 03:52:40 CET 2006
- Previous message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Next message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum <guido at python.org> wrote:
In py3k, when the str object is eliminated, then what do you have? Perhaps - bytes("\x80"), you get an error, encoding is required. There is no such thing as "default encoding" anymore, as there's no str object. - bytes("\x80", encoding="latin-1"), you get a bytestring with a single byte of value 0x80. Yes to both again.
I haven't been following this dicussion about bytes() real closely but I don't think that bytes() should do the encoding. We already have a way to spell that:
"\x80".encode('latin-1')
Also, I think it would useful to introduce byte array literals at the same time as the bytes object. That would allow people to use byte arrays without having to get involved with all the silly string encoding confusion.
Neil
- Previous message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Next message: [Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]