Type and syntax highlight /u/Puzzleheaded-Lore118 Python Education

Greetings,

Recently I’ve been tweaking a file syntax from a text editor in order to extend how some keywords are recognized and highlighted. The default file works fine yet some instances are fairly color repetitive, for instance calling a class method to an object uses the same color as a variable definition and the function calls (custom and built-in) won’t be highlighted differently from a variable. So I try to contribute to the project and something from the review catched my eye which I’m not sure if that’s a real thing, the other contributor stated:

Attempting to syntax highlight type annotations specifically is IMO ill-advised, because Python does not have a clear separation of types and runtime variables.>

Now, forgive is I’m wrong but, what does that even mean? Higlighted or not the statements in a text editor do not have any effect in how the code is written let alone executed, right? Does highlight affect the performance of the script? What I’m missing?

Thanks’s in advance!

submitted by /u/Puzzleheaded-Lore118
[link] [comments]

​r/learnpython Greetings, Recently I’ve been tweaking a file syntax from a text editor in order to extend how some keywords are recognized and highlighted. The default file works fine yet some instances are fairly color repetitive, for instance calling a class method to an object uses the same color as a variable definition and the function calls (custom and built-in) won’t be highlighted differently from a variable. So I try to contribute to the project and something from the review catched my eye which I’m not sure if that’s a real thing, the other contributor stated: Attempting to syntax highlight type annotations specifically is IMO ill-advised, because Python does not have a clear separation of types and runtime variables.> Now, forgive is I’m wrong but, what does that even mean? Higlighted or not the statements in a text editor do not have any effect in how the code is written let alone executed, right? Does highlight affect the performance of the script? What I’m missing? Thanks’s in advance! submitted by /u/Puzzleheaded-Lore118 [link] [comments] 

Greetings,

Recently I’ve been tweaking a file syntax from a text editor in order to extend how some keywords are recognized and highlighted. The default file works fine yet some instances are fairly color repetitive, for instance calling a class method to an object uses the same color as a variable definition and the function calls (custom and built-in) won’t be highlighted differently from a variable. So I try to contribute to the project and something from the review catched my eye which I’m not sure if that’s a real thing, the other contributor stated:

Attempting to syntax highlight type annotations specifically is IMO ill-advised, because Python does not have a clear separation of types and runtime variables.>

Now, forgive is I’m wrong but, what does that even mean? Higlighted or not the statements in a text editor do not have any effect in how the code is written let alone executed, right? Does highlight affect the performance of the script? What I’m missing?

Thanks’s in advance!

submitted by /u/Puzzleheaded-Lore118
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *