2006年10月28日 星期六 12:29
ÈçºÎɾ³ýÒ»¸ö·½·¨£¿ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20061028/c570f929/attachment.htm
2006年10月28日 星期六 12:47
>>> def Func(): pass ... >>> Func>>> del Func >>> Func Traceback (most recent call last): File " ", line 1, in ? NameError: name 'Func' is not defined >>> On 10/28/06, 英 <erying1985 at 163.com> wrote: > > > 如何删除一个方法? > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese >
2006年10月29日 星期日 16:45
? дµÀ: > ÈçºÎɾ³ýÒ»¸ö·½·¨£¿ > ------------------------------------------------------------------------ > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese >>> class a(): def aa(self): print "test",self >>> bb=a() >>> aa=a() >>> bb.aa() test <__main__.a instance at 0x00D383A0> >>> aa.aa() test <__main__.a instance at 0x00D3C378> >>> del a.aa >>> bb.aa() Traceback (most recent call last): File "", line 1, in bb.aa() AttributeError: a instance has no attribute 'aa' >>> def aa(): pass >>> aa() >>> del aa -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20061029/20ab3561/attachment.html
Zeuux © 2025
京ICP备05028076号