Score:1

In Gedit, which syntax highlighting option is for Python 3.x?

us flag

Gedit has two options for syntax highlighting for Python:

  • Python
  • Python2

Is the "Python" option for:

  1. Older versions of Python less than version 2 (ex. 1.6, 1.5, ...)

    ...or...

  2. Newer versions of Python greater than version 2 (ex. 3.0, 3.1, 3.9, ...)

In other words, to do syntax highlighting for Python 3.9, which of the two options should I select?

I am using Gedit version 40.1-1 in Ubuntu 21.10. Here is a screenshot of Gedit's syntax highlighting options menu:

Gedit Syntax Highlighting Options Menu

Someone avatar
my flag
"Python" option will work for you (I am using it from a lot of time I don't think that there is a problem)
Score:2
us flag

Aside from Python 1.x being completely irrelevant these days (do you expect the "Python console" in gedit to run Python 1?), if you need confirmation, here's the defining line for "Python" in the GtkSourceView source code:

<language id="python3" name="Python" version="2.0" _section="Script">

GtkSourceView is the library used by gedit for syntax highlighting.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.