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.

On 2/23/07, Jason Orendorff <[EMAIL PROTECTED]> wrote:

On 2/22/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> If someone would like to volunteer a small PEP on the b"..." literal I
> would appreciate it.

I'll do this, unless someone tells me not to.  A few questions.

The grammar for string literals is already changing in py3k (removing
the tolerance of bogus escape sequences and the u"" prefix, I think).
Is the new grammar documented anywhere?  p3yk/Doc/ref/ref2.tex seems
to still have the 2.x grammar, and I didn't see anything in the PEPs.

How do you feel about raw byte-strings (br'a\b\c') and long
byte-strings (b'''...''')?

> The main concern here is that bytes objects are
> mutable; I think the right semantics will be that each time a b"..."
> literal is evaluated a *new* bytes object is created, just like [1, 2,
> 3] constructs a new list each time it is evaluated. The alternative
> would be a literal that could be modified in place, which reminds me
> of the worst of Fortran.

Yes, that seems clear.

-j
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/thomas%40python.org




--
Thomas Wouters <[EMAIL PROTECTED]>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
_______________________________________________
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

Reply via email to