Given a file containing a backslash preceeded and followed by any number of newlines, Black ae5588 and 19.3b0 throw blib2to3.pgen2.tokenize.TokenError: 'EOF in multi-line statement', (2, 0).
I consider this a bug because Python is perfectly happy to execute such files, doing nothing, and compile("\\", "<string>", "exec") also works:
>>> code = compile("\\", "<string>", "exec") # or "\\\n", or "\n\\\n", etc.
>>> import dis; dis.dis(code)
1 0 LOAD_CONST 0 (None)
2 RETURN_VALUE
Like #970, I found this with Hypothesmith.
Given a file containing a backslash preceeded and followed by any number of newlines, Black ae5588 and 19.3b0 throw
blib2to3.pgen2.tokenize.TokenError: 'EOF in multi-line statement', (2, 0).I consider this a bug because Python is perfectly happy to execute such files, doing nothing, and
compile("\\", "<string>", "exec")also works:Like #970, I found this with Hypothesmith.