PY3 xrange, np.divide, string.uppsercase, None comparison

Fixes #2108.