Skip to content

Commit f905ef1

Browse files
committed
-
1 parent 654526f commit f905ef1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source_py3/python_toolbox/monkeypatching_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def decorator(function):
4646
if isinstance(function, types.FunctionType):
4747
name_ = name or function.__name__
4848

49-
new_method = types.MethodType(function, None, monkeypatchee) if \
49+
new_method = types.MethodType(function, monkeypatchee) if \
5050
monkeypatchee_is_a_class else types.MethodType(function,
51-
monkeypatchee, class_of_monkeypatchee)
51+
class_of_monkeypatchee)
5252
setattr(monkeypatchee, name_, new_method)
5353
return function
5454
else:

source_py3/python_toolbox/sleek_reffing/cute_sleek_value_dict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
__all__ = ['CuteSleekValueDict']
1818

1919

20-
class CuteSleekValueDict(collections.MutableMapping, object):
20+
class CuteSleekValueDict(collections.UserDict):
2121
"""
2222
A dictionary which sleekrefs its values and propagates their callback.
2323
@@ -40,7 +40,7 @@ def remove(sleek_ref, weak_ref_to_csvd=weakref.ref(self)):
4040
del csvd.data[sleek_ref.key]
4141
csvd.callback()
4242
self._remove = remove
43-
UserDict.UserDict.__init__(self, *args, **kwargs)
43+
collections.UserDict.__init__(self, *args, **kwargs)
4444

4545

4646
def __getitem__(self, key):

0 commit comments

Comments
 (0)