首页 新闻 会员 周边

python中使用getName方法,输出结果却没有

0
[已关闭问题] 关闭于 2011-09-27 12:50
1 #! /usr/bin/env python
2 #coding=utf-8
3 import time
4 import threading
5 class mythread(threading.Thread):
6 def__init__(self,threadname):
7 threading.Thread.__init__(self,name = threadname)
8 def run(self):
9 print self.getName()
10
11 t1 = mythread('t1')
12 t1.getName()
Miss_Ay的主页 Miss_Ay | 初学一级 | 园豆:176
提问于:2011-09-12 13:43
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册