diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_long.py')
| -rw-r--r-- | Lib/lib2to3/fixes/fix_long.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/lib2to3/fixes/fix_long.py b/Lib/lib2to3/fixes/fix_long.py index 5fd6af5..873ecf1 100644 --- a/Lib/lib2to3/fixes/fix_long.py +++ b/Lib/lib2to3/fixes/fix_long.py @@ -5,20 +5,18 @@ """ # Local imports -from .. import pytree from .. import fixer_base -from ..fixer_util import Name, Number +from ..fixer_util import Name, Number, is_probably_builtin class FixLong(fixer_base.BaseFix): PATTERN = "'long'" - static_long = Name("long") static_int = Name("int") def transform(self, node, results): - assert node == self.static_long, node - new = self.static_int.clone() - new.set_prefix(node.get_prefix()) - return new + if is_probably_builtin(node): + new = self.static_int.clone() + new.set_prefix(node.get_prefix()) + return new |
