class Mallard implements Duck public void quack() System.out.println("Quack!");

class Mallard: def quack(self): print("Quack!")

Notice the difference? In the Python example, Goose is treated like a duck simply because it can perform the action. It doesn't need to prove its lineage.