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-145378: Generate consistent colors for pdb commands by gaogaotiantian · Pull Request #149305 · python/cpython Conversation
|
Documentation build overview
5 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return None | ||
|
|
||
| def gen_colors(self, buffer): | ||
| from _pyrepl.utils import ColorSpan, Span |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just nit comment, now we can use lazy import right?
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.
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.
This instance itself is protected by a check for the existence of _pyrepl (_pyrepl_available). If this instance is created, then _pyrepl must exist. Having these _pyrepl related imports inside the method saves us the trouble to deal with the cases where _pyrepl does not exist. If the same class is used multiple times, lazy import might be a better options. I hope that makes sense?
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.
overall lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.