Python Oop File Handling Polymorphism Example