def post():
print("this is post")
print("想不到吧")
class Http():
@classmethod
def get(self):
print("this is get")
def main():
Http.get=post
if __name__ == '__main__':
main()
Http.get()
转载于:https://www.cnblogs.com/c-x-a/p/10918217.html