Re: [BangPypers] problem with python classes

2013-05-09 Thread Noufal Ibrahim
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

Re: [BangPypers] problem with python classes

2013-05-09 Thread steve
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

Re: [BangPypers] problem with python classes

2013-05-09 Thread Abdul Muneer
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

[BangPypers] problem with python classes

2013-05-09 Thread hiharry danny
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