Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47ff38a

Browse files
tacaswelljankatins
authored andcommitted
MNT: python 2.6 compatibility fix
1 parent 9c1199b commit 47ff38a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,9 @@ def foo(ax, *args, **kwargs)
15891589
def param(func):
15901590
new_sig = None
15911591
ver_info = sys.version_info
1592-
_python_has_signature = ver_info.major > 2 and ver_info.minor > 2
1592+
# py2.6 compatible version, use line below as soon as we can
1593+
_python_has_signature = ver_info[0] > 2 and ver_info[1] > 2
1594+
# _python_has_signature = ver_info.major > 2 and ver_info.minor > 2
15931595
if not _python_has_signature:
15941596
arg_spec = inspect.getargspec(func)
15951597
_arg_names = arg_spec.args

0 commit comments

Comments
 (0)