<br>I'm not telling you not to do this, but I already wrote a preliminary patch (well, it's not actually *working* yet, but the hard part, the grammar changes, are working ;) Of course, it may be fun to compare implementations.
<br><br><div><span class="gmail_quote">On 2/23/07, <b class="gmail_sendername">Jason Orendorff</b> <<a href="mailto:jason.orendorff@gmail.com">jason.orendorff@gmail.com</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 2/22/07, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>> If someone would like to volunteer a small PEP on the b"..." literal I<br>> would appreciate it.<br><br>
I'll do this, unless someone tells me not to. A few questions.<br><br>The grammar for string literals is already changing in py3k (removing<br>the tolerance of bogus escape sequences and the u"" prefix, I think).
<br>Is the new grammar documented anywhere? p3yk/Doc/ref/ref2.tex seems<br>to still have the 2.x grammar, and I didn't see anything in the PEPs.<br><br>How do you feel about raw byte-strings (br'a\b\c') and long
<br>byte-strings (b'''...''')?<br><br>> The main concern here is that bytes objects are<br>> mutable; I think the right semantics will be that each time a b"..."<br>> literal is evaluated a *new* bytes object is created, just like [1, 2,
<br>> 3] constructs a new list each time it is evaluated. The alternative<br>> would be a literal that could be modified in place, which reminds me<br>> of the worst of Fortran.<br><br>Yes, that seems clear.<br><br>
-j<br>_______________________________________________<br>Python-3000 mailing list<br><a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/python-3000">http://mail.python.org/mailman/listinfo/python-3000
</a><br>Unsubscribe: <a href="http://mail.python.org/mailman/options/python-3000/thomas%40python.org">http://mail.python.org/mailman/options/python-3000/thomas%40python.org</a><br></blockquote></div><br><br clear="all"><br>
-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!