[Python-3000] Release Countdown (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Sep 1 03:35:10 CEST 2007


Jim Jewett wrote:

I would prefer that x.split(":") work.

If that happens because bytes.split does the conversion for me (so that x.split(sep) also works), then great. But I realize that would require an assumption about the proper encoding.

If you're going to do things like that, why stop at the parameters to bytes methods? It's hard to argue that they should be treated specially, rather than allowing strings to be cast to bytes in any context that expects bytes. And then the clear distinction between str and bytes that we're trying to maintain breaks down.

You can't have it both ways. The type error you're complaining about is just the sort of error that the str/bytes distinction is meant to catch.

-- Greg



More information about the Python-3000 mailing list