In a few of the examples fixed up here, the distinction between long and int was not important here. As a result, I converted those to use int instead of long everywhere to make the code simpler since six doesn't have something like six.long that resolves to int in py3 and long in py2. So we just use int everywhere.
The other fixes are fairly straightforward.