python: Share generated methods between objects.