在Python中调用基类方法[bis]

时间:2016-05-21 15:21:48

标签: python python-2.7 oop

this question一样,我试图从派生类中调用基类的方法:

class Base(object):
    def __get(self):
        print "Base::get"

class Derived(Base):
    def __init__(self):
        super(Derived,self).__get()

d=Derived()

为什么此代码会返回AttributeError: 'super' object has no attribute '_Derived__get'

0 个答案:

没有答案