[BangPypers] problem with python classes
noufal at nibrahim.net.in
Fri May 10 06:17:14 CEST 2013
hiharry danny <hrdspl at gmail.com> 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 of ClassTwo but the computation will
> be done by a method of ClassOne which is called by the user defined method
> of class two ...?
> so what will be the solution ?
Can you post back some examples of how you would use ClassTwo? The basic
solution is to delegate all the work to the instances of ClassOne and
Whether you do this by accessing certain attributes or calling different
functions will make the code different.
More information about the BangPypers