摘要: class Foo: x=1 def __init__(self,y): self.y=y def __getattr__(self, item): print('----> from getattr:你找的属性不存在') def __setattr__(self, key, value): print('--... 阅读全文
posted @ 2018-11-13 20:57 986428528 阅读(96) 评论(0) 推荐(0)
摘要: import settings import uuid import json import os import json as default_json from json.encoder import JSONEncoder class MyJsonEncoder(JSONEncoder): def default(self, o): if isinstance(o... 阅读全文
posted @ 2018-11-13 11:13 986428528 阅读(122) 评论(0) 推荐(0)