PyCharm lets you define the color of the word "self" just because it's used all over the place and is sort-of ignored when reading. I think it's a nice feature.
Would you want it colored as a keyword?
I think it would be a separate color category of it's own ('self' parameter) or something, since it is expected but is not technically any different from other parameters. You could just color the word itself or if you do some code analysis, you could color whatever word is in that parameter position for that function.Another nice color category would be predefined Python functions like "__init__" and "__str__"
On second thought, it is different from other parameters, as it is provided automatically. So, the code analysis method probably makes way more sense than just coloring the string "self"
We might add support for this in the future. Wing uses the scintilla's python lexer for syntax highlighting, which would support coloring self as a keyword. Other options would be more difficult to implement.
That'd be a fine start for my purposes. I found it pretty nice that "self" was colored in PyCharm.
Copyrights © 2016 All rights reserved
A community is a group of people who share a common interest. A community on AllAnswered.com can be
Avoid communities that are too broad, such as Food, Software, Math.
If you join a community, you will get an email notification whenever a question for that community is posted.
The community admin can make his/her email public to receive private emails from other users in
the community. A private email is directly sent through email server and is not saved in our system.
This feature is mainly designed for community leader or organization support staff to receive direct emails
from other users who do not want to use the public board for specific issues.