Leveraging Python's duck typing