emacs-devel
[Top][All Lists]
Advanced

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

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


From: Konstantin Kharlamov
Subject: Re: [RFE] python-mode: removing `file` keyword from syntax highlight
Date: Fri, 24 Jan 2025 10:50:38 +0300
User-agent: Evolution 3.54.3

On Wed, 2025-01-22 at 15:57 +0300, Konstantin Kharlamov wrote:
> 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

CC: kobarity



reply via email to

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