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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight builtins #39230
Comments
There was a recent discussion on c.l.p regarding shadowing builtins. (Summary, DONT). The point was made that decent editors should highlight builtins and keywords. The attached patch enables hightlighting of all entries in __builtin__ excluding those starting with a '_' |
Logged In: YES Thanks for the patch! This also implemented a fix for IDLEfork bug Add a highlight theme for builtin keywords. M ClassBrowser.py 1.8 |
Logged In: YES This also fixed |
Logged In: YES There's bug in the patch: if a builtin keyword is typed after ## builtin = r"([^\\\\.]\b|^)" + any("BUILTIN", builtinlist) + r"\b" builtin = r"\b" + any("BUILTIN", builtinlist) + r"\b" seems to fix the symptom but the original obviously had a |
Logged In: YES The purpose of the r"([^\\\\.]\b|^)" is to prevent member vars with the ie given self.file=file(filename) only the second 'file' should be colorised as However, you are quite right WRT the quoting bug. Changeing the r"([^\\\\.]\b|^)" to r"([^\\\\.'\\"]\b|^)" seems to fix it so that -- |
Logged In: YES Damm that word wrap!!
|
Logged In: YES Can this be closed? This or something like it is already in. FWIW, the barney purple made the code harder to read rather |
Logged In: YES I don't understand why SF doesn't fix it. It's a real Thanks for the fix! ColorDelegator 1.14 |
Logged In: YES Raymond must have a traumatic experience in his past. I muted the barney purple to royal purple. Don't blame |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: