Python: class hierarchies; return pointer to base