Skip to content

Fix cmdline doc to make '-m timeit' consistent with other parts of th… #16910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jgors
Copy link

@jgors jgors commented Oct 24, 2019

…e docs.

The syntax in the cmdline documentation is confusing regarding the -m timeit code. In the timeit documentation it always shows the command line invocation as python -m timeit, so this is just a very simple PR to keep the docs consistent throughout.

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@jgors

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

Copy link
Contributor

@eamanu eamanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this PR doesn't get any improve on the documentation. python -mtimeit work successfully.

BTW, @jgors don't forget sign CLA

@jgors
Copy link
Author

jgors commented Nov 5, 2019

IMO this PR doesn't get any improve on the documentation. python -mtimeit work successfully.

I noticed that it works before submitting the PR, but it seems odd to me. Just like this works, python -c"print('Hi')", but it definitely seems strange when there isn't a space between the arg and what's being passed to it, like: python -c "print('hello')". Also, I tried pip and it works with same way -- with pip install -rrequirements.txt behaving exactly like pip install -r requirements.txt). This behavior seems puzzling.

Think of *nix commands. For example, rm. When you want to pass several args 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 were to call the command without a space between the argument(s) and the file to be removed (e.g.rm -fimyfile.py).

It's not really clear why this command line behavior in python would be intentional. Even though it currently works as is, it's not obvious as to why this is (or should be) the case.

I created an issue for this.

@rougeth
Copy link
Contributor

rougeth commented Aug 5, 2020

I believe the consistence by itself already is a good argument for the PR. @jgors as Ned wrote at the issue, have you seen other cases that needs update?

@iritkatriel
Copy link
Member

Thanks, @jgors. This was already fixed here #18853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants