GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — gh-154675: pprint use lazy imports by edvilme · Pull Request #156803 · python/cpython Conversation
|
| lazy from dataclasses import is_dataclass | ||
| lazy from dataclasses import fields as dataclass_fields | ||
| lazy import re |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Consider _is_dataclass, _dataclass_fields, _re as aliases instead, akin to the imports above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed in e055683
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Do you have any benchmarks for various use cases? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think this has zero impact on performance. The imports were always lazy, just inside the functions. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh right sorry, I don't know how I missed that. I think we can close this, it's just a refactor, and IMO churn. IIRC the PEP had a section that noted this will not be done? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I think so. The linked issue is about improving import times, but this PR does |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
There are no expensive modules that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, I'm sorry but I'm closing. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.