[issue31253] Python fails to parse commented out code

2017-08-22 Thread Andrew Wall
Andrew Wall added the comment: My lazy way of programming is to piece together lines of code, going round and round commenting and uncommenting sections until I get something that works. My new lazy way of commenting out larger chunks of code will be: r''' ... several lines of code

[issue31253] Python fails to parse commented out code

2017-08-22 Thread Vedran Čačić
Vedran Čačić added the comment: That's because it is not commented code, it is a multiline string literal. And it is not raw, so \Un... is just an error, since n is not a valid hexadecimal digit. In the first code, \Un... is inside a raw string so it is read literally. There is nothing to fix

[issue31253] Python fails to parse commented out code

2017-08-22 Thread Andrew Wall
New submission from Andrew Wall: Python can parse and run this code: log = list(r'..\Unknown\*.txt') but not this: ''' log = list(r'..\Unknown\*.txt') ''' -- components: Interpreter Core messages: 300670 nosy: quamrana priority: normal severity: normal status: open title: Python