Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - Is the grammar for 3.0 the same as 3.3?

I noticed when setting up a PyDev project in Eclipse that the latest grammar version available is 3.0. However, I noticed in this question/answer that the grammar from 3.0 doesn't change when moving to 3.1. Is the same true between 3.0 and 3.3? Thank you much!

like image 238
golmschenk Avatar asked Oct 30 '13 16:10

golmschenk


1 Answers

There are no changes in 3.2, as PEP 3003 was in effect, but 3.0-3.3 adds yield from which was invalid in 3.2, and also once again allows u'...' for Unicode string literals (this was valid in 2.x but not in 3.x until 3.3). See http://docs.python.org/3.3/whatsnew/3.3.html. If you don't use either of those features, you should be fine with a 3.0 grammar.

If you do use those features (yield from is handy but you're unlikely to have u-tagged strings if you've been coding in Python 3.x) then that might get improperly colored and/or flagged as an error. I don't use PyDev and don't know what it actually uses the grammar for; you might give it a try anyway since the syntax differences are so small.

like image 111
kindall Avatar answered Sep 30 '22 19:09

kindall