can't remember if this works in Python 3, but if it doesn't, import `long` from compat.