Python Is the grammar for 3.0 the same as 3.3?

I noticed that when setting up the PyDev project in Eclipse, the latest version of grammar 3.0 appeared. However, I noticed in this question / answer that the grammar from 3.0 does not change when switching to 3.1. Is the same true between 3.0 and 3.3? Thank you very much!

+6
source share
1 answer

There are no changes in 3.2, since PEP 3003 acted, but 3.0-3.3 adds yield from , which was invalid in 3.2, and also allows u'...' for Unicode string literals again (this was valid in 2.x, but not in 3.x to 3.3). See http://docs.python.org/3.3/whatsnew/3.3.html . If you are not using any of these features, you should be fine with 3.0 grammar.

If you use these functions ( yield from convenient, but it is unlikely that you have u -tagged lines if you were encoded in Python 3.x), then this may be incorrectly colored and / or flagged as an error. I do not use PyDev and I do not know what it uses grammar for; you can give it a try, since the differences in syntax are so small.

+5
source

Source: https://habr.com/ru/post/957056/


All Articles