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

Thomas Wouters thomas at python.org
Fri Feb 23 18:17:08 CET 2007


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 <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.
>
> 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/thomas%40python.org
>



-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070223/5d7a36aa/attachment.html 


More information about the Python-3000 mailing list