2007年09月05日 星期三 09:18
python-chinese£¬ÄãºÃ ÔËÐÐÁËһϡ£Êä³ö£º A.__private() B.public() nmweizi£¬nmweizi在163.com 2007-08-17 ----- Original Message ----- From: ºî»ªÂ¡ To: pythonÖйú Sent: 2007-08-17, 15:49:42 Subject: [python-chinese] ¿´¿´Õâ¶ÎÎÄÕµÄÊä³ö ¸Õ¿´ÁËһƪÎÄÕ class A(object): def __init__(self): self.__private() self.public() def __private(self): print 'A.__private()' def public(self): print 'A.public()' class B(A): def __private(self): print 'B.__private()' def public(self): print 'B.public()' b = B() ²Â²ÂÊä³öʲô? ºî»ªÂ¡ 2007-08-17 -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070905/5159ea4e/attachment.html
2007年09月05日 星期三 18:10
A.__private() B.public() ÔÚ07-9-5£¬nmweizi <nmweizi在163.com> дµÀ£º > > python-chinese£¬ÄãºÃ > ÔËÐÐÁËһϡ£Êä³ö£º > > A.__private() > B.public() > > > nmweizi£¬nmweizi在163.com<%3C%21--AID_FROMADDRESS_BEGIN--%3Enmweizi在163.com%3C%21--AID_FROMADDRESS_END--%3E> > 2007-08-17 > > ----- Original Message ----- > *From: *ºî»ªÂ¡ <hou_hl在sina.com> > *To: *pythonÖйú <python-chinese在lists.python.cn> > *Sent: *2007-08-17, 15:49:42 > *Subject: *[python-chinese] ¿´¿´Õâ¶ÎÎÄÕµÄÊä³ö > > ¸Õ¿´ÁËһƪÎÄÕ > class A(object): > def __init__(self): > self.__private() > self.public() > def __private(self): > print 'A.__private()' > def public(self): > print 'A.public()' > class B(A): > def __private(self): > print 'B.__private()' > def public(self): > print 'B.public()' > b = B() > ²Â²ÂÊä³öʲô? > ------------------------------ > ºî»ªÂ¡ > 2007-08-17 > > > _______________________________________________ > 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 > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070905/38a50991/attachment.htm
2007年09月05日 星期三 19:35
OOP考题中经常出现的题目 On 9/5/07, dezhong liu <zhongliude at gmail.com> wrote: > > A.__private() > B.public() > > 在07-9-5,nmweizi <nmweizi at 163.com> 写道: > > > > python-chinese,你好 > > 运行了一下。输出: > > > > A.__private() > > B.public() > > > > > > nmweizi,nmweizi at 163.com<%3C%21--AID_FROMADDRESS_BEGIN--%3Enmweizi at 163.com%3C%21--AID_FROMADDRESS_END--%3E> > > 2007-08-17 > > > > ----- Original Message ----- > > *From: *侯华隆 <hou_hl at sina.com> > > *To: *python中国 <python-chinese at lists.python.cn> > > *Sent: *2007-08-17, 15:49:42 > > *Subject: *[python-chinese] 看看这段文章的输出 > > > > 刚看了一篇文章 > > class A(object): > > def __init__(self): > > self.__private() > > self.public() > > def __private(self): > > print 'A.__private()' > > def public(self): > > print 'A.public()' > > class B(A): > > def __private(self): > > print 'B.__private()' > > def public(self): > > print 'B.public()' > > b = B() > > 猜猜输出什么? > > ------------------------------ > > 侯华隆 > > 2007-08-17 > > > > > > _______________________________________________ > > 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 > > > > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070905/7b24c2e0/attachment.htm
Zeuux © 2025
京ICP备05028076号