Anders and Briegel in Python
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

21 行
357B

  1. """
  2. Utility functions for ABP
  3. """
  4. import json
  5. def xyz(x, y, z=0):
  6. return {"x": x, "y": y, "z": z}
  7. class ABPJsonEncoder(json.JSONEncoder):
  8. def default(self, thing):
  9. print thing
  10. if __name__ == '__main__':
  11. j = ABPJsonEncoder()
  12. print j.encode({1:2})
  13. j = ABPJsonEncoder()
  14. print j.encode({1:2})
  15. print j.encode({(1,2):2})