[Python-Dev] PEP 332 revival in coordination with pep 349? [ Was:Re: release plan for 2.5 ?]
Neil Schemenauer
nas at arctrix.com
Tue Feb 14 20:31:07 CET 2006
On Mon, Feb 13, 2006 at 08:07:49PM -0800, Guido van Rossum wrote:
> On 2/13/06, Neil Schemenauer <nas at arctrix.com> wrote:
> > "\x80".encode('latin-1')
>
> But in 2.5 we can't change that to return a bytes object without
> creating HUGE incompatibilities.
People could spell it bytes(s.encode('latin-1')) in order to make it
work in 2.X. That spelling would provide a way of ensuring the type
of the return value.
> You missed the part where I said that introducing the bytes type
> *without* a literal seems to be a good first step. A new type, even
> built-in, is much less drastic than a new literal (which requires
> lexer and parser support in addition to everything else).
Are you concerned about the implementation effort? If so, I don't
think that's justified since adding a new string prefix should be
pretty straightforward (relative to rest of the effort involved).
Are you comfortable with the proposed syntax?
Neil
More information about the Python-Dev
mailing list