[Geany-Devel] Python filetype 2 or 3 or both?

Lex Trotman elextr at gmail.com
Wed Jan 23 05:17:20 UTC 2013


Hi All,

We have only one Python filetype, but Python has two versions.

There are some differences between them in terms of keywords and builtins.

For example exec, nonlocal, True, False and None are not keywords for
Python 2 but are for 3.

And print is a keyword for 2 but not for 3.

There are similar changes to the builtins.

At the moment True, False and None are in the keyword list but exec
and nonlocal are not.  There is a PR to remove True, False and None.

Since Python 3 is gaining ground I suggest that it would be better to
have an aggregate of both Pythons for both keywords and builtins.
Whilst that is wrong for both, I think missing keywords is worse than
extras.

What do other Python users think?

Cheers
Lex


More information about the Devel mailing list