Cpp Defining Methods With Polymorphism In Python