-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
IDLE: remove \b from colorizer string prefix #77385
Comments
Lib\idlelib\colorizer.py, line 25, is: The r prefix, but only the r prefix, must be preceded by a non-word character. On pydev thread "IDLE colorizer", MRAB noted: "The \b will apply only to the first choice. Shouldn't it be more like: I think the \b should be removed instead. Currently uf'a' gets f'a' colored, while ur'a' only gets 'a' colored. (Tim Peters pointed out the difference with a different example.) I prefer coloring the maximal legal string rather than the minimum. I think the contrast between two chars legal by themselves, but differently colored when put together, makes the bug more obvious. |
The current test is part of the htest. The section # Invalid combinations of legal characters should be half colored. |
Sounds good (removing \b) to me, Terry! |
To see the visually verified test, run Lib/idlelib/colorizer as the main module, either from a command line or editor, and click the button. |
Is ''or'' correctly colorized? |
Yes, still correct, as a keyword. Legal "x or''" is colored as "x" <normal> "or" <keyword> "''" <string>. Legal "if'':" is colored as "if" <keyword> "''" <string> ":" <normal>". New PR revises colorizer test and add the above. |
Should this be closed as resolved? |
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: