On 8/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 8/6/07, Chris Monson <[EMAIL PROTECTED]> wrote: > > On 8/6/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > On 8/6/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > > b) should bytes literals be regular or frozen bytes? > > > > > > Regular -- set literals produce mutable sets, too. > > > > But all other string literals produce immutable types: > > > > "" > > r"" > > u"" (going away, but still) > > and hopefully b"" > > > > Wouldn't it be confusing to have b"" be the only mutable quote-delimited > > literal? For everything else, there's bytes(). > > Well, it would be just as confusing to have a bytes literal and not > have it return a bytes object. The frozenbytes type is intended (if I > understand the use case correctly) as for the relatively rare case > where bytes must be used as dict keys and we can't assume that the > bytes use any particular encoding. > > Personally, I still think that converting to the latin-1 encoding is > probably just as good for this particular use case. So perhaps I don't > understand the use case(s?) correctly. > > > :-) > > What does the :-) mean? That you're not seriously objecting?
No, just that I'm friendly. (just a smile, not a wink). I still think that having b"" be the only immutable string-looking thing is a bad idea. Just because the types are named "bytes" and "frozenbytes" instead of "bytes" and "BytesIO" or something similar doesn't mean that the syntax magically looks right. -- > --Guido van Rossum (home page: http://www.python.org/~guido/) >
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
