import threading
import time
class myThread(threading.Thread): #定义子类,类继承
def __init__(self, name, delay):
threading.Thread.__init__(self) #通过父类的init()函数构造
self.name = name
self.delay = delay
import threading
import time
class myThread(threading.Thread): #定义子类,类继承
def __init__(self, name, delay):
threading.Thread.__init__(self) #通过父类的init()函数构造
self.name = name
self.delay = delay
本文标题:python __init__ 的使用
本文链接:https://www.haomeiwen.com/subject/cxzeiftx.html
网友评论