__all__ = ['long']


if hasattr(__builtins__, 'long'):
    long = long
else:
    class long(int):
        pass

__all__ = ['long']


if 'long' in __builtins__:
    long = __builtins__['long']
else:
    class long(int):
        pass

Fix bug encoding long type in python 2.x
Fix bug encoding long type in python 2.x

  __all__ = ['long']
  
  
- if hasattr(__builtins__, 'long'):
-     long = long
+ if 'long' in __builtins__:
+     long = __builtins__['long']
  else:
      class long(int):
          pass
  
Fix bug encoding long type in python 2.x
## Code Before:
__all__ = ['long']


if hasattr(__builtins__, 'long'):
    long = long
else:
    class long(int):
        pass

## Instruction:
Fix bug encoding long type in python 2.x
## Code After:
__all__ = ['long']


if 'long' in __builtins__:
    long = __builtins__['long']
else:
    class long(int):
        pass
