homepage

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 steven.daprano
Recipients steven.daprano
Date 2021年11月05日.01:53:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org>
In-reply-to
Content
A frequent newbie mistake is to call shell commands from inside the interactive interpreter. Most common is to call Python itself.
Here is an example where a Python instructor was allegedly unable to diagnose the issue for their students:
https://windowsquestions.com/2021/10/09/syntaxerror-invalid-syntax-perhaps-you-forgot-a-comma/
I think it would be a nice feature if the compiler recognised obvious cases of "user tried to call Python from the Python prompt", and suggested a fix. If the statement matches the regex r"python\s+" the error message might say "it looks like you are trying to run a shell command at the Python prompt" rather than suggest a missing comma.
History
Date User Action Args
2021年11月05日 01:53:40steven.dapranosetrecipients: + steven.daprano
2021年11月05日 01:53:40steven.dapranosetmessageid: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org>
2021年11月05日 01:53:40steven.dapranolinkissue45721 messages
2021年11月05日 01:53:40steven.dapranocreate

AltStyle によって変換されたページ (->オリジナル) /