diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-04-19 14:30:53 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-04-19 14:30:53 -0400 |
commit | a47db2f576108590756b8e5360bf29b6f02a9ab0 (patch) | |
tree | 196ae8dd313013e3c02238cf7c46a7c29e729eaf /six.py | |
parent | 4895c1c7bb958d40f645f3a9106cf22d093f004e (diff) | |
download | six-a47db2f576108590756b8e5360bf29b6f02a9ab0.tar.gz |
add create_bound_method
Diffstat (limited to 'six.py')
-rw-r--r-- | six.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -253,11 +253,16 @@ if PY3: def get_unbound_function(unbound): return unbound + create_bound_method = types.MethodType + Iterator = object else: def get_unbound_function(unbound): return unbound.im_func + def create_bound_method(func, obj): + return types.MethodType(func, obj, obj.__class__) + class Iterator(object): def next(self): |