[Python-Dev] str object going in Py3K

Adam Olsen rhamph at gmail.com
Wed Feb 15 05:14:45 CET 2006

On 2/14/06, Just van Rossum <just at letterror.com> wrote:
> +1 for two functions.
> My choice would be open() for binary and opentext() for text. I don't
> find that backwards at all: the text function is going to be more
> different from the current open() function then the binary function
> would be since in many ways the str type is closer to bytes than to
> unicode.
> Maybe it's even better to use opentext() AND openbinary(), and deprecate
> plain open(). We could even introduce them at the same time as bytes()
> (and leave the open() deprecation for 3.0).

Thus providing us with a transition period, even with warnings on use
of the old function.

I think coming up with a way to transition that doesn't silently break
code and doesn't leave us with permanent ugly names is the hardest
challenge here.

+1 on opentext(), openbinary()
-1 on silently changing open() in a way that results in breakage

Adam Olsen, aka Rhamphoryncus

More information about the Python-Dev mailing list