aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ply/lex.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ply/lex.py')
-rw-r--r--lib/ply/lex.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/ply/lex.py b/lib/ply/lex.py
index 267ec100f..182f2e837 100644
--- a/lib/ply/lex.py
+++ b/lib/ply/lex.py
@@ -705,11 +705,7 @@ class LexerReflect(object):
# Sort the functions by line number
for f in self.funcsym.values():
- if sys.version_info[0] < 3:
- f.sort(lambda x,y: cmp(func_code(x[1]).co_firstlineno,func_code(y[1]).co_firstlineno))
- else:
- # Python 3.0
- f.sort(key=lambda x: func_code(x[1]).co_firstlineno)
+ f.sort(key=lambda x: func_code(x[1]).co_firstlineno)
# Sort the strings by regular expression length
for s in self.strsym.values():