摘要: 1 #include 2 3 void PrintNum1(int n); 4 void PrintNum2(int n); 5 void ShowNum(int n, void (* ptr)(int)); 6 7 void PrintMessage1(); 8 void PrintMessage2(); 9 void PrintMessage3... 阅读全文
posted @ 2018-01-15 17:09 魂~ 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 1 class LeiFeng(object): 2 3 def Sweep(self): 4 print("扫地") 5 6 def Wash(self): 7 print("洗衣") 8 9 def BuyRice(self): 10 print("买米") 11 12 13 class IF... 阅读全文
posted @ 2018-01-15 17:02 魂~ 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1 class Operation(): 2 3 def __init__(self, NumberA=0, NumberB=0): 4 self.NumberA = NumberA 5 self.NumberB = NumberB 6 7 def GetResult(self): 8 pass 9 10 ... 阅读全文
posted @ 2018-01-15 16:58 魂~ 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1 class Singleton(object): 2 3 def __new__(cls, *args, **kwargs): 4 if not hasattr(cls, '_the_instance'): 5 cls._the_instance = object.__new__(cls, *args, **kwargs) 6 ... 阅读全文
posted @ 2018-01-15 14:31 魂~ 阅读(162) 评论(0) 推荐(0) 编辑