Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59f3917

Browse files
committed
Merge pull request#5 from tacaswell/unpack_labeled_data_alternative
Vetter checks for python and IPython
2 parents572c1e2 +67fda44 commit59f3917

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎lib/matplotlib/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,13 +1588,12 @@ def foo(ax, *args, **kwargs)
15881588

15891589
defparam(func):
15901590
new_sig=None
1591-
ver_info=sys.version_info
1592-
# py2.6 compatible version, use line below as soon as we can
1593-
python_has_signature=ver_info[0]>2andver_info[1]>2
1594-
# python_has_signature = ver_info.major > 2 and ver_info.minor > 2
1595-
python_has_wrapped=ver_info[0]>2andver_info[1]>1
1596-
# python_has_wrapped = ver_info.major > 2 and ver_info.minor > 1
1597-
ifnotpython_has_signature:
1591+
python_has_signature=major>=3andminor1>=3
1592+
python_has_wrapped=major>=3andminor1>=2
1593+
1594+
# if in a legacy version of python and IPython is already imported
1595+
# try to use their back-ported signature
1596+
ifnotpython_has_signatureand'IPython'insys.modules:
15981597
try:
15991598
importIPython.utils.signatures
16001599
signature=IPython.utils.signatures.signature

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp