Anders and Briegel in Python
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

21 řádky
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})