emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFE] python-mode: removing `file` keyword from syntax highlight


From: Konstantin Kharlamov
Subject: [RFE] python-mode: removing `file` keyword from syntax highlight
Date: Wed, 22 Jan 2025 15:57:00 +0300
User-agent: Evolution 3.54.3

Seems to be a simple change, but knowing sometimes such things raise
discussions, decided to ask here first.

While working with Python I frequently notice word `file` highlighted
as a keyword, even though I never remember using such library function
or a keyword.

Some digging showed that `file` was a built-in type in Python2 that's
gone in Python3 in preference of `open()` function which returns type
`IO[Any]`.

Nowadays word `file` is just a typical variable name you can see while
working with open (pun intended), case in point¹. Seeing it's
highlighted as if it's any special is annoying. Given that Python2 has
been dead for ½ a decade at this point, can we perhaps remove `file`
from the list of keywords?

1: https://stackoverflow.com/a/8369345/2388257



reply via email to

[Prev in Thread] Current Thread [Next in Thread]