answered 13 years ago
So, it seems that in many situations we have to code if isinstance (n, (int, Integer)) instead of if isinstance (n, Integer), despite the fact that the latter is much more natural. Sigh.
if isinstance (n, (int, Integer))
if isinstance (n, Integer)