codon
codon copied to clipboard
json.dump gives "'File' object has no attribute '__to_py__'" error
Here is my simple code file:
from python import json
with open('data.json', 'w') as f:
json.dump([1, 2, 3], f)
And here is the error:
Am I doing anything wrong?