classification
Title: Mention of "-m" Flag Missing From Doc on Execution Model
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.8, Python 3.7, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ncoghlan Nosy List: docs@python, eric.araujo, eric.snow, ezio.melotti, ncoghlan
Priority: normal Keywords: patch

Created on 2011-11-24 20:10 by eric.snow, last changed 2018-07-28 13:06 by steve.dower.

Pull Requests
URL Status Linked Edit
PR 6900 closed elusivenode, 2018-05-16 11:31
PR 6901 open elusivenode, 2018-05-16 11:59
Messages (3)
msg148288 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2011-11-24 20:10
The doc on code execution[1] leaves out mention of the -m flag.  Seems like it belongs there too.

[1] Doc/reference/executionmodel.rst
msg148398 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-26 13:06
I guess you’re suggesting adding a mention of -m in the section near the top that says that a script file and code passed to -c are blocks?  Makes sense.  The same commit could also improve the markup to link to the description of script, -c and -m in using/cmdline.  (I think we have another doc bug open about cross-linking using/cmdline and other parts, but I don’t have the number at hand.)
msg316914 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2018-05-17 11:41
I've assigned the PR and issue to myself, as the proposed addition in the PR isn't quite right, but it isn't immediately obvious why not.

The gist of the problem is that the current docs are actually correct and complete: modules are the first thing listed as being code blocks, and whether you import them or execute them as __main__ doesn't change that.

However, I can also see why 2011-Eric thought it looked incomplete, so I'm thinking it may make sense to restructure that entire paragraph as a bulleted list, where it would be possible to mention both imported modules and modules executed as main, without giving the impression that those are inherently different things.
History
Date User Action Args
2018-07-28 13:06:29steve.dowersetkeywords: - easy
2018-05-17 11:41:49ncoghlansetassignee: docs@python -> ncoghlan
messages: + msg316914
2018-05-16 11:59:08elusivenodesetpull_requests: + pull_request6571
2018-05-16 11:31:59elusivenodesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request6570
2018-02-25 21:03:37cheryl.sabellasetkeywords: + easy
type: enhancement
versions: + Python 3.7, Python 3.8, - Python 3.2, Python 3.3
2011-11-26 13:06:48eric.araujosetnosy: + eric.araujo, ncoghlan
messages: + msg148398
2011-11-24 20:32:26ezio.melottisetnosy: + ezio.melotti

stage: needs patch
2011-11-24 20:10:58eric.snowcreate