Visitar URL original
bpo-40670: Improve documentation for timeit function by edison12a · Pull Request #20830 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20260124015518/https://github.com/python/cpython/pull/20830
Skip to content
/ cpython Public

Conversation

@edison12a
Copy link
Contributor

@edison12a edison12a commented Jun 12, 2020 •

@edison12a edison12a changed the title bpo-40670Improve documentation for timeit function bpo-40670: Improve documentation for timeit function Jun 12, 2020
Args:
stmt (str): The code to be excuted. This can have multiple statements
separated by ; and \n.

Choose a reason for hiding this comment

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

should this be "seperated by ; or \n."?

Comment on lines +250 to +252
Raises:
IndentationError: If 'stmt' is an empty string.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer true after 557b9a5

"""Convenience function to create Timer object and call timeit method.
Args:
stmt (str): The code to be excuted. This can have multiple statements
Copy link
Contributor

Choose a reason for hiding this comment

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

"executed"

*stmt* and *setup* may also contain multiple statements separated by ``;``
or newlines, as long as they don't contain multi-line string literals. The
statement will by default be executed within timeit's namespace; this behavior
The constructor takes suite of statement to be timed, an additional suite
Copy link
Contributor

Choose a reason for hiding this comment

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

"a suite"

@iritkatriel
Copy link
Member

https://bugs.python.org/issue40670 is closed. What is the status of this PR?

@rhettinger
Copy link
Contributor

Personally, I don't find this to be a helpful improvement. If someone else thinks otherwise; feel free to reopen.

@rhettinger rhettinger closed this May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants