On Tue, Sep 7, 2010 at 2:04 AM, Stefan Behnel <[email protected]> wrote: > Robert Bradshaw, 07.09.2010 10:24: >> Actually, b'abcüöä' is a syntax error "bytes can only contain ASCII >> literal characters," > > I didn't know and am deeply surprised they did that in Python 3. So, you're > right, Python compatibility dictates that bytes literals contain only ASCII > characters in this case.
This is necessary for the source encoding to be orthogonal to the source content, as it should be. > This would be something to change for -3, in > addition to (but separate from) the existing unicode_literals behaviour. > Note that Py2.[67] accept the above just fine with unicode_literals enabled. > > However, I don't see how this favours disallowing escaped byte values > 127 > in char* literals, which appear even safer in this light. I'm actually not opposed to allowing escaped byte values in char* literals, it was just an easy place to draw the line. (In fact, I think it would make life easier.) What I am opposed to is treating escapes differently based on the way in which a literal is used. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
