python中类的基本使用

    xiaoxiao2022-07-14  151

    #!/usr/bin/env python3 class Stack(object): def __init__(self): self.stack = [] def push(self, object): self.stack.append(object) def pop(self): return self.stack.pop() def length(self): return len(self.stack) class EventHandler(object): @staticmethod def dispatcherThread(): while (1): print("do something")

     

    最新回复(0)