Skip to content
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

The word file is highlighted as if it has special meaning #217

Closed
dan1994 opened this issue Jul 20, 2020 · 2 comments
Closed

The word file is highlighted as if it has special meaning #217

dan1994 opened this issue Jul 20, 2020 · 2 comments

Comments

@dan1994
Copy link

dan1994 commented Jul 20, 2020

  • 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__.

image

Steps to reproduce:

  1. Create a new python file
  2. Write the word file in it
@1st1
Copy link
Member

1st1 commented Jul 22, 2020

It has a special meaning - it's a builtin in Python 2. The scope name includes "legacy" in it, IIRC.

@1st1 1st1 closed this as completed Jul 22, 2020
@dan1994
Copy link
Author

dan1994 commented Jul 25, 2020

My bad, Didn't know that.
Thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants