Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-107424: avoid using lambda functions intextwrap.indent()
#107426
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedJul 29, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedJul 29, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
Our goal is not only maximize performance. And In#107374, I made the code slightly simpler by removing generator.
Yes. It is old technique. Recent Python has little method call overhead. So |
Uh oh!
There was an error while loading.Please reload this page.
As mentioned by#107374 (comment), avoiding the use of a lambda function when no predicate is specified is expected to improve the performances.
The benchmarks reported on the issue corroborate this assumption. However, I would like to know if this is only because my laptop is dying (caching
.append
calls do not seem to help however).I am waiting for changes to be verified before creating a NEWS entry (should I create it in conjunction to the already created one by@methane ?)
textwrap.indent
a bit more. #107424