Clean up compare to use the tuple. Thanks @olasd

This commit is contained in:
Paul Tagliamonte 2014-01-01 22:30:09 -05:00
parent f452558f5e
commit 590d3bf1df
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ except ImportError:
import sys
PY3 = sys.version_info[0] >= 3
PY33 = sys.version_info[0] >= 3 and sys.version_info[1] >= 3
PY33 = sys.version_info >= (3, 3)
if PY3:
str_type = str

View File

@ -754,7 +754,7 @@ class HyASTCompiler(object):
ret = handler_results
if sys.version_info[0] >= 3 and sys.version_info[1] >= 3:
if sys.version_info >= (3, 3):
# Python 3.3 features a merge of TryExcept+TryFinally into Try.
return ret + ast.Try(
lineno=expr.start_line,
@ -1199,7 +1199,7 @@ class HyASTCompiler(object):
optional_vars=thing,
body=body.stmts)
if sys.version_info[0] >= 3 and sys.version_info[1] >= 3:
if sys.version_info >= (3, 3):
the_with.items = [ast.withitem(context_expr=ctx.force_expr,
optional_vars=thing)]
@ -1699,7 +1699,7 @@ class HyASTCompiler(object):
arglist = expression.pop(0)
ret, args, defaults, stararg, kwargs = self._parse_lambda_list(arglist)
if sys.version_info[0] >= 3 and sys.version_info[1] >= 4:
if sys.version_info >= (3, 4):
# Python 3.4+ requres that args are an ast.arg object, rather
# than an ast.Name or bare string.
args = [ast.arg(arg=ast_str(x),