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-134953: Expand theming for `True`/`False`/`None` by StanFromIreland · Pull Request #135000 · python/cpython Conversation
| |||||||||||||||||||||
| class Syntax(ThemeSection): | ||
| prompt: str = ANSIColors.BOLD_MAGENTA | ||
| keyword: str = ANSIColors.BOLD_BLUE | ||
| keyword_constant: str = ANSIColors.BOLD_BLUE |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
And so the question is, do we want to change this for pyrepl?
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.
I agree with the issue OP that the is None in particular being in the same color looks strange.
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.
It could default to ANSIColors.CYAN, since True, False, and None would then be the same color as all the built-ins.
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.
I'm happy letting people customize it but I don't think None/True/False should be highlighted as builtins by default. They can't be accessed by builtins.None (causes a SyntaxError) and can't be overridden (again, a SyntaxError). I would keep the default as is.
The reason you want it highlighted like builtins is because historically they were just default values in the builtin scope, therefore highlighters treated them as such. That's no longer the case, they are actual keywords now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,2 @@ | |||
| Expand ``_colorize`` theme with ``keyword_colorize`` and implement in | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think keyword_colorize was meant to be keyword_constant here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @StanFromIreland for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…35000) (cherry picked from commit a5b9d0b) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Łukasz Langa <[email protected]>
|
GH-138928 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
#138928) Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Łukasz Langa <[email protected]>
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.