9 Mar
2000
9 Mar
'00
5:25 p.m.
In this case subclassing won't work and I'm not needing to do this dynamically. DR Pavlos Christoforou wrote:
On Thu, 9 Mar 2000, Daniel G. Rusch wrote:
Let's say I have a class called Chicken in a file called Chicken.py
Now let's say I want to add a method called getSize() to the Chicken class. It's a piece of cake to add the method in the Chicken.py file.
But, is it possible to add the method to the Chicken class, but have that method in a different file, i.e. some file other than Chicken.py?
It really depends on how bad your intentions are. Could you use subclassing? Or do you want to add methods dynamically after instance creation?
P