On Thu, Dec 11, 2014 at 9:27 AM, Luciano Ramalho <luci...@ramalho.org> wrote:
> I know I can do type(A+B)(A), or A+B-B, but both alternatives are ugly
> and perform needless arithmetic.
>
> What do you suggest, now that the coerce() built-in is not available?

I would suggest just doing the arithmetic :) That's guaranteed to
work, and a little addition isn't that costly. (As long as you're not
Numberphile and implementing four-bit binary arithmetic in racing
dominoes. Then it's costly.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to