问题 Python 中没有 switch 的语法,但是很多时候需要多重条件判断,又不想写多个 if,那只能手动实现了。 实现代码 1 2 3 4 5 6 7 8 9 10 11 12 13 class RunMethod: def post(self,url=None,data=None,header=None): print(url) def get(self,url=None,data=None,header=None): print("get") def……

阅读全文