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

Thomas Young thomasyoung at free.fr
Wed Jan 23 09:14:11 UTC 2013

Hi Lex,

For myself, yes, I'd definitely say that missing keywords is worse than 
And just including all of these as keywords seems fine.

As an aside note that I quite often find myself getting stuff like local 
variables and parameters coloured as keywords in wing, not because of 
differences in python versions, but because it actually seems to be ok 
to 'hide' built in stuff with your own definitions.

See, for example, the following:

python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> False = True
 >>> print False

(I wouldn't do this in real code, but in many situations it is quite 
convenient to not worry about trying to avoid name clashes with built in 

Best regards,


On 23/01/13 06:17, Lex Trotman wrote:
> 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
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel

More information about the Devel mailing list