diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2014-01-14 18:48:53 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2014-01-14 18:48:53 -0500 |
commit | 62ad2eb82c037350f25d3e575e59f16740365159 (patch) | |
tree | 50a94b0334e52640b38efbda556e927171779368 /pies | |
parent | f57d1ee13f673f9a1392a310ec75426e8f283a81 (diff) | |
download | pies-62ad2eb82c037350f25d3e575e59f16740365159.tar.gz |
Fix small incompatibility with Python 3.2
Diffstat (limited to 'pies')
-rw-r--r-- | pies/ast.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pies/ast.py b/pies/ast.py index 015e24e..ef576eb 100644 --- a/pies/ast.py +++ b/pies/ast.py @@ -1,12 +1,16 @@ from __future__ import absolute_import +import sys from ast import * from .version_info import PY2 -if PY2: +if PY2 or sys.version_info[1] <= 2: Try = TryExcept +else: + TryFinally = () +if PY2: def argument_names(node): return [isinstance(arg, Name) and arg.id or None for arg in node.args.args] @@ -16,8 +20,6 @@ if PY2: def kw_only_default_count(node): return 0 else: - TryFinally = () - def argument_names(node): return [arg.arg for arg in node.args.args] |