Delegation in Python

Brian Gladman noone at nowhere.net
Sat Jan 24 18:38:20 EST 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