Can I, in a class that is meant to be subclassed, get the class variable for an instance of its children? Something like this:
class A:
...
def doStuff(self):
c = getChildClass(self)
setattr(c, 'anAttribute', value)
There is some interesting memoization I want to do, and this would make the task so much easier.
If you mean the class of the instance itself, use
self.__class__.