The word `file` is highlighted as if it has special meaning
dan1994 opened this issue · 2 comments
dan1994 commented
- Editor name and version: Visual Studio Code 1.47.2
- Platform: Windows 10 2004 (Build 19041.388)
- Color scheme: Dark+
- MagicPython version: None (Comes builtin in VS Code according to the README)
- A sreenshot: Provided in the issue description below.
- 5-10 lines of surrounding code: N/A
The following description is copy pasted from an issue I accidentally opened in the VS Code python extension repo (#13047). I was referred to this repo from there.
Expected behaviour
The word file doesn't hold any special meaning in python as far as I know (I opened and interpreter typed file and got NameError).
That being the case I would expect it to be highlighted in the same ways as other variable names (which in my case is default color).
Actual behaviour
The word file is highlighted in light blue, the same as global python variables such as __name__ and __file__.
Steps to reproduce:
- Create a new python file
- Write the word
filein it
1st1 commented
It has a special meaning - it's a builtin in Python 2. The scope name includes "legacy" in it, IIRC.
dan1994 commented
My bad, Didn't know that.
Thanks for the clarification
