Skip to content

Profile docs has error in example in tldr #102994

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
TheWizier opened this issue Mar 24, 2023 · 1 comment
Closed

Profile docs has error in example in tldr #102994

TheWizier opened this issue Mar 24, 2023 · 1 comment
Labels
docs Documentation in the Doc dir easy

Comments

@TheWizier
Copy link

TheWizier commented Mar 24, 2023

Documentation

https://docs.python.org/3/library/profile.html
The following example is given in the Instant User's Manual section:

214 function calls (207 primitive calls) in 0.002 seconds

Ordered by: cumulative time

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1    0.000    0.000    0.002    0.002 {built-in method builtins.exec}
     1    0.000    0.000    0.001    0.001 <string>:1(<module>)
     1    0.000    0.000    0.001    0.001 __init__.py:250(compile)
     1    0.000    0.000    0.001    0.001 __init__.py:289(_compile)
     1    0.000    0.000    0.000    0.000 _compiler.py:759(compile)
     1    0.000    0.000    0.000    0.000 _parser.py:937(parse)
     1    0.000    0.000    0.000    0.000 _compiler.py:598(_code)
     1    0.000    0.000    0.000    0.000 _parser.py:435(_parse_sub)

however in the description of the example:
The next line: Ordered by: cumulative name, indicates ...

Which does not match the example

Linked PRs

@TheWizier TheWizier added the docs Documentation in the Doc dir label Mar 24, 2023
@hugovk
Copy link
Member

hugovk commented Mar 24, 2023

Thanks for the report, would you like to create a PR to fix it?

The file to edit is https://github.com/python/cpython/blob/main/Doc/library/profile.rst

@hugovk hugovk added the easy label Mar 24, 2023
nouranali added a commit to nouranali/cpython that referenced this issue Mar 28, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 2, 2023
miss-islington added a commit that referenced this issue Apr 2, 2023
(cherry picked from commit 55decb7)

Co-authored-by: Nouran Ali <[email protected]>
gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this issue Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

No branches or pull requests

3 participants