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. >
Thomas Wouters has been working on it while here at PyCon. I would wait to see what he says before you dive into it. -Brett > 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/brett%40python.org > _______________________________________________ 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
