Message296212
Terry:
The eval is important. The bug was in evaluating an f-string that consisted of two bytes: a backslash followed by a newline.
And just as:
eval("'\\\n'") == '' # len == 0
so should
eval("f'\\\n'") == '' # len == 0
It's the second one that was throwing the assertion. The parser was seeing these bytes:
f 0x66
' 0x27
\ 0x5c
nl 0xa
' 0x27
and behaving badly (to say the least) by asserting.
Without the eval, I can't think of a way to have a string consisting of those two bytes, but I assume someone who's trickier than I can come up with a way. |
|
Date |
User |
Action |
Args |
2017-06-16 16:49:50 | eric.smith | set | recipients:
+ eric.smith, terry.reedy, ned.deily, serhiy.storchaka |
2017-06-16 16:49:50 | eric.smith | set | messageid: <1497631790.47.0.339057804659.issue30682@psf.upfronthosting.co.za> |
2017-06-16 16:49:50 | eric.smith | link | issue30682 messages |
2017-06-16 16:49:50 | eric.smith | create | |
|