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 jgors
Recipients jgors
Date 2019-11-05.00:04:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1572912256.03.0.374020363309.issue38690@roundup.psfhosted.org>
In-reply-to
Content
The syntax in the Command line documentation was unexpected regarding the `-m` option (specifically `python -mtimeit`) [0].  Showing this:

```
python -mtimeit "range(100)"
# behaving equivalent to this:
python -m timeit "range(100)"
```

This led me to discover many cases where command line arguments are like this in python (e.g. the call working correctly without a space between an argument flag and what is being passed into the command).  Like this:

```
python -c"print('Hi')"
# behaving the same as:
python -c "print('Hi')"
```

This is also the case with pip as well:

```
pip install -rrequirements.txt 
# behaving exactly like:
pip install -r requirements.txt
```

However, when I think of the *nix commands, like `rm`, this behavior fails.  When you want to pass several flags at once, you can either list them separately (e.g. `rm -f -i myfile.py`) or concatenate them together (e.g. `rm -fi myfile.py`), but `rm` fails if you try calling it without a space between the argument(s) and the file to be removed (e.g.`rm -fimyfile.py`).

I'm not sure whether this command line behavior in python is intentional, but it's not obvious as to why this is the case.

[0] https://docs.python.org/3/using/cmdline.html#cmdoption-m
History
Date User Action Args
2019-11-05 00:04:16jgorssetrecipients: + jgors
2019-11-05 00:04:16jgorssetmessageid: <1572912256.03.0.374020363309.issue38690@roundup.psfhosted.org>
2019-11-05 00:04:15jgorslinkissue38690 messages
2019-11-05 00:04:15jgorscreate