hiharry danny writes:
[...]
> if this be the case , then without using inheritance property of OOP ,i,e,
> without creating further new subclasses , how can I access other user
> defined methods of ClassOne class via Class Two class. The ouput value will
> be returned by a user defined method o
Hi,
On Thursday 09 May 2013 09:11 PM, hiharry danny wrote:
i have python 2.7.4..now suppose i have two new-style base classes ,
i.e. class ClassName(object):
and the two base classes are related by __init__ constructor where the
__init__ constructor of one base class is accessed by the __in
Hi,
If it is necessary that the calculation has to be performed by ClassOne,
use a classmethod.
class ClassOne(object):
def __init__(self, value):
self.value = value
@classmethod
def calculate_value(cls, value):
return new_value
and in ClassTwo, change the r
i have python 2.7.4..now suppose i have two new-style base classes ,
i.e. class ClassName(object):
and the two base classes are related by __init__ constructor where the
__init__ constructor of one base class is accessed by the __init property
of the other base class , for example :
class Clas