We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8018c35 commit 85d7eeeCopy full SHA for 85d7eee
python_toolbox/monkeypatching_tools.py
@@ -3,6 +3,7 @@
3
4
'''Tools for monkeypatching.'''
5
6
+import sys
7
import types
8
9
from python_toolbox import misc_tools
@@ -64,6 +65,8 @@ def decorator(function):
64
65
raise NotImplemented
66
name_ = function.getter.__name__
67
elif isinstance(function, (classmethod, staticmethod)):
68
+ if sys.version_info[:2] <= (2, 6):
69
+ name_ = function.__name__
70
name_ = function.__func__.__name__
71
else:
72
raise NotImplemented("`monkeypatch_method` doesn't know how "
0 commit comments