"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Is it reading text or binary data from stream blah? We can't tell. If | it's meant to be reading text, 2to3 should leave it alone. But if it's | meant to be reading binary data, 2to3 should change the string | literals to bytes literals (b"" in this case). (If it's used for both, | there's no hope.) As it stands, 2to3 hasn't a chance to decide what to | do, so it will leave it alone -- but the "translated" code will be | wrong if it was meant to be reading bytes.
It seems that the main purpose of adding bytes (as more or less a synonym for str when used as bytes) is to aid 2to3 translation. So I think I would favor it being part of a future import. | Note that I believe that the -3 flag should not change semantics -- it | should only add warnings. Semantic changes must either be backwards | compatible or be requested explicitly with a __forward__ import (which | 2to3 can remove). Were you planning to make bytes a __future__ (or __forward__?) import? I think making it so should satisfy Raymond's concerns. Even if whatever you eventually do is technically backwards compatible, he is suggesting that conceptually, it is not. I see some validity to that view. tjr _______________________________________________ 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