'''使类继承多线程'''
import threading
import time

class MyThread(threading.Thread):
    def run(self):
        for i in  range(3):
            time.sleep(1)
            msg="我是叫 "+self.name+' @ '+str(i) #name属性中保存的是当前线程的名字
            print(msg)

if __name__=="__main__":
    MyThread().start();