Scott David Daniels wrote:
> bruno at modulix wrote:
>
>> Ralf Muschall wrote:
>>
>>> Jeffrey Barish wrote:
>>>
>>> [overriding of base class member functions by subclass]
>>> In Python, a function not intended to be overriden should be either
>>> have a name starting with an underscore
>>
>>
Jeffrey Barish wrote:
> I believe that the answer to my question is no, but I want to be sure that I
> understand this issue correctly: Suppose that there are two classes
> defined as follows:
>
> class A(object):
> def f1(self):
> print 'In A.f1, calling func'
> self.func()
>
bruno at modulix wrote:
>> In Python, a function not intended to be overriden should be either
>> have a name starting with an underscore
> actually with *two* underscores. The single-leading-underscore naming
> scheme is the convention for 'protected' (read: 'implementation, not
> API') attribut
bruno at modulix wrote:
> Ralf Muschall wrote:
>> Jeffrey Barish wrote:
>>
>> [overriding of base class member functions by subclass]
>> In Python, a function not intended to be overriden should be either
>> have a name starting with an underscore
>
> actually with *two* underscores. The sing
Ralf Muschall wrote:
> Jeffrey Barish wrote:
>
> [overriding of base class member functions by subclass]
>
(snip)
>
> In Python, a function not intended to be overriden should be either
> have a name starting with an underscore
actually with *two* underscores. The single-leading-underscore nami
Jeffrey Barish wrote:
> Suppose that there are two classes defined as follows:
>
> class A(object):
> def f1(self):
> print 'In A.f1, calling func'
> self.func()
>
> def func(self):
> print 'In A.func'
>
> class B(A):
> def func(self):
> print 'In B.fu
Jeffrey Barish wrote:
[overriding of base class member functions by subclass]
> but then B does not inherit other functions of A that I would like to use.
> It struck me that this must be a common problem in OOP, so I'm wondering
> whether there is a simple solution that I am missing.
In C++, o
Jeffrey Barish wrote:
> I believe that the answer to my question is no, but I want to be sure that I
> understand this issue correctly: Suppose that there are two classes
> defined as follows:
>
> class A(object):
> def f1(self):
> print 'In A.f1, calling func'
> self.func()
>
I believe that the answer to my question is no, but I want to be sure that I
understand this issue correctly: Suppose that there are two classes
defined as follows:
class A(object):
def f1(self):
print 'In A.f1, calling func'
self.func()
def func(self):
print 'In