Let's say I'm trying to make an imaginary number class in python (just as an exercise, I know there already is one built in). You should be able to add imaginary numbers to other imaginary numbers as well as imaginary numbers to ints and vice versa.
I got a hang of adding imaginaries to other imaginaries using __add__() and it seems like I might be able to add imaginaries to ints using duck typing (though I don't quite understand how), but I have no idea how to add an int to an imaginary. Please send help.