source: python/trunk/Lib/lib2to3/fixes/fix_long.py

Last change on this file was 391, checked in by dmik, 11 years ago

python: Merge vendor 2.7.6 to trunk.

  • Property svn:eol-style set to native
File size: 477 bytes
Line 
1# Copyright 2006 Google, Inc. All Rights Reserved.
2# Licensed to PSF under a Contributor Agreement.
3
4"""Fixer that turns 'long' into 'int' everywhere.
5"""
6
7# Local imports
8from lib2to3 import fixer_base
9from lib2to3.fixer_util import is_probably_builtin
10
11
12class FixLong(fixer_base.BaseFix):
13 BM_compatible = True
14 PATTERN = "'long'"
15
16 def transform(self, node, results):
17 if is_probably_builtin(node):
18 node.value = u"int"
19 node.changed()
Note: See TracBrowser for help on using the repository browser.