The following lines in Eclipse + PyDev with Python 3.4 work, but it is highlighted as Undefined variable from import: dump
error:
import json
with open('C:\\test', 'w') as outfile:
json.dump([1, 2, 3], outfile)
Here is a snapshot of the Eclipse editor:
How do I get rid of that error?
EDIT
The output of:
import json
with open('C:\\test', 'w') as outfile:
json.dump([1, 2, 3], outfile)
print(json.__file__)
Is:
C:\Python34\lib\json\__init__.py
Here is the list of attributes that Eclipse shows: