This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tusharsadhwani
Recipients lys.nikolaou, pablogsal, tusharsadhwani
Date 2022-01-25.15:09:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643123376.15.0.69468893853.issue46521@roundup.psfhosted.org>
In-reply-to
Content
compile_command used to raise error for this until Python 3.9:

```
>>> import code
>>> code.compile_command("abc def '''")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/codeop.py", line 132, in compile_command
    return _maybe_compile(_compile, source, filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 106, in _maybe_compile
    raise err1
  File "/usr/lib/python3.9/codeop.py", line 93, in _maybe_compile
    code1 = compiler(source + "\n", filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 111, in _compile
    return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
  File "<input>", line 1
    abc def '''
        ^
SyntaxError: invalid syntax
```

But in Python 3.10.0 it no longer is an error:

```
>>> import code
>>> code.compile_command("abc def '''")
>>>
```
History
Date User Action Args
2022-01-25 15:09:36tusharsadhwanisetrecipients: + tusharsadhwani, lys.nikolaou, pablogsal
2022-01-25 15:09:36tusharsadhwanisetmessageid: <1643123376.15.0.69468893853.issue46521@roundup.psfhosted.org>
2022-01-25 15:09:36tusharsadhwanilinkissue46521 messages
2022-01-25 15:09:36tusharsadhwanicreate