Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save 對 json 的處理為何是在外面 #30

Open
linroex opened this issue Feb 6, 2016 · 0 comments
Open

save 對 json 的處理為何是在外面 #30

linroex opened this issue Feb 6, 2016 · 0 comments
Assignees

Comments

@linroex
Copy link
Collaborator

linroex commented Feb 6, 2016

def save(self, data):
        with open('items.json', 'wt', encoding = 'utf-8') as output:
            output.write(data)

save 裡面都明確定義是存成 json file 了,為什麼 json.dumps 是在外面處理?
不要只是把程式修改好,也搞懂為什麼我認為要在 save 裡面處理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants