Python: Polymorphism, Method Overriding & Duck Typing
Think about the power button on a TV remote, an AC remote, and a car key fob. You press the same button on each one, but a completely different thing happens every time. The TV turns on, the AC starts cooling, the car unlocks. Same action, different result depending on what you are pressing it on. That is Python polymorphism in one picture: one name, many behaviours. “If it walks like a duck and it quacks like a duck, then ... Read More
