On Mon, Feb 13, 2006 at 08:07:49PM -0800, Guido van Rossum wrote: > On 2/13/06, Neil Schemenauer <[EMAIL PROTECTED]> 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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com