summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_ne.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-07-21 12:55:57 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-07-21 12:55:57 (GMT)
commitdd6a4edc4554cdb808f08a9ade7e40ed5addc94d (patch)
treeaccdbab3c1fe2e088a6437d5598bc921f22c10b0 /Lib/lib2to3/fixes/fix_ne.py
parentafcd5f36f00d3a368004c574642175f623ce8ad4 (diff)
downloadcpython-dd6a4edc4554cdb808f08a9ade7e40ed5addc94d.zip
cpython-dd6a4edc4554cdb808f08a9ade7e40ed5addc94d.tar.gz
cpython-dd6a4edc4554cdb808f08a9ade7e40ed5addc94d.tar.bz2
merge 2to3 improvments
Diffstat (limited to 'Lib/lib2to3/fixes/fix_ne.py')
-rw-r--r--Lib/lib2to3/fixes/fix_ne.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/lib2to3/fixes/fix_ne.py b/Lib/lib2to3/fixes/fix_ne.py
index 1472036..e3ee10f 100644
--- a/Lib/lib2to3/fixes/fix_ne.py
+++ b/Lib/lib2to3/fixes/fix_ne.py
@@ -12,9 +12,11 @@ from .. import fixer_base
class FixNe(fixer_base.BaseFix):
# This is so simple that we don't need the pattern compiler.
+ _accept_type = token.NOTEQUAL
+
def match(self, node):
# Override
- return node.type == token.NOTEQUAL and node.value == "<>"
+ return node.value == "<>"
def transform(self, node, results):
new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix)