<br><br><div><span class="gmail_quote">On 8/6/07, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 8/6/07, Chris Monson <<a href="mailto:shiblon@gmail.com">shiblon@gmail.com</a>> wrote:<br>> On 8/6/07, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>> > On 8/6/07, "Martin v. Löwis" <
<a href="mailto:martin@v.loewis.de">martin@v.loewis.de</a>> wrote:<br>> > > b) should bytes literals be regular or frozen bytes?<br>> ><br>> > Regular -- set literals produce mutable sets, too.<br>
><br>> But all other string literals produce immutable types:<br>><br>> ""<br>> r""<br>> u"" (going away, but still)<br>> and hopefully b""<br>><br>> Wouldn't it be confusing to have b"" be the only mutable quote-delimited
<br>> literal? For everything else, there's bytes().<br><br>Well, it would be just as confusing to have a bytes literal and not<br>have it return a bytes object. The frozenbytes type is intended (if I<br>understand the use case correctly) as for the relatively rare case
<br>where bytes must be used as dict keys and we can't assume that the<br>bytes use any particular encoding.<br><br>Personally, I still think that converting to the latin-1 encoding is<br>probably just as good for this particular use case. So perhaps I don't
<br>understand the use case(s?) correctly.<br><br>> :-)<br><br>What does the :-) mean? That you're not seriously objecting?</blockquote><div><br>No, just that I'm friendly. (just a smile, not a wink).<br><br>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.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">--<br>--Guido van Rossum (home page: <a href="http://www.python.org/~guido/">http://www.python.org/~guido/
</a>)<br></blockquote></div><br>