Reputation: 199
When saving python files, vim-syntactic starts debugging and raises syntax errors (specifically commas), whether its in a list, dictionary, tuple etc. Here is an image after saving python file.
Upvotes: 0
Views: 69
Reputation: 199
Vim-Syntactic throws syntax errors when you don't add a space after commas.
√ animals = set(['cat', 'dog', 'mouse']) # no errors
x animals = set(['cat','dog','mouse']) # errors
Upvotes: 0
Reputation: 17664
The problem is your code, that is not valid syntax, I guess you are very new to python...
An object is declared using the {}
Here is how an object looks like:
farm_animals = {"sheep":"big", "cow":"huge"}
print(farm_animals)
You can try it out online on some other editor:
http://py3.codeskulptor.org/#user301_UotVM3f1Pw_0.py
Upvotes: 0