~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/lib2to3/fixes/fix_long.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
"""
6
6
 
7
7
# Local imports
8
 
from .. import fixer_base
9
 
from ..fixer_util import Name, Number, is_probably_builtin
 
8
from lib2to3 import fixer_base
 
9
from lib2to3.fixer_util import is_probably_builtin
10
10
 
11
11
 
12
12
class FixLong(fixer_base.BaseFix):
13
13
 
14
14
    PATTERN = "'long'"
15
15
 
16
 
    static_int = Name("int")
17
 
 
18
16
    def transform(self, node, results):
19
17
        if is_probably_builtin(node):
20
 
            new = self.static_int.clone()
21
 
            new.set_prefix(node.get_prefix())
22
 
            return new
 
18
            node.value = u"int"
 
19
            node.changed()