[Python-3000] Thoughts on new I/O library and bytecode

Brett Cannon brett at python.org
Fri Feb 23 18:16:52 CET 2007

On 2/23/07, Jason Orendorff <jason.orendorff at gmail.com> wrote:
> On 2/22/07, Guido van Rossum <guido at python.org> 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.


> 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
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/brett%40python.org

More information about the Python-3000 mailing list