Delegation in Python

Brian Gladman noone at nowhere.net
Sun Jan 25 00:38:20 CET 2015


On 24/01/2015 23:22, Chris Angelico wrote:
> class RF(Fraction):
>     def is_integer(self):
>        return self.numerator % self.denominator == 0

Thanks for your help on this.  I must admit that nowhere in a lot of
searching did I find that delegation is achieved by doing nothing!

   Brian






More information about the Python-list mailing list