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 ncoghlan
Recipients Jonathan Huot, docs@python, ncoghlan, terry.reedy
Date 2018-03-24.04:25:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521865500.67.0.467229070634.issue33119@psf.upfronthosting.co.za>
In-reply-to
Content
This is deliberate, and is covered in the documentation at https://docs.python.org/3/using/cmdline.html#cmdoption-m where it says 'If this option is given, the first element of sys.argv will be the full path to the module file (while the module file is being located, the first element will be set to "-m").'

The part in parentheses is the bit that's applicable here.

We've not going to change that, as the interpreter startup relies on checking sys.argv[0] for "-m" and "-c" in order to work out how it's expected to handle sys.path initialization.
History
Date User Action Args
2018-03-24 04:25:00ncoghlansetrecipients: + ncoghlan, terry.reedy, docs@python, Jonathan Huot
2018-03-24 04:25:00ncoghlansetmessageid: <1521865500.67.0.467229070634.issue33119@psf.upfronthosting.co.za>
2018-03-24 04:25:00ncoghlanlinkissue33119 messages
2018-03-24 04:25:00ncoghlancreate