Look at this simple dictionary:
d = {'name': 'soroush', 'age': 25}
Suppose I want to assign a new value to d in a wrong way:
d['aaa'] : 'bbb' instead of d['aaa'] = 'bbb'
Python does nothing in this situation...If I print the dictionary I get the same content as before. I expected to get a syntax error.
Isn't it too buggy in a large application and something that python interpreter should warn instead of skipping? My second question is, does : cause this to be skipped?
d = {'name': 'soroush', 'age': 25}
print(d)
d['aaa']: 'bbb'
print(d)