Changeset 163
- Timestamp:
- 05/23/02 12:41:20 (7 years ago)
- Files:
-
- trunk/RBFoundation/RBFoundation/WeakBind.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/RBFoundation/RBFoundation/WeakBind.py
r161 r163 42 42 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 43 44 typesMethods = (types.MethodType, types.UnboundMethodType )44 typesMethods = (types.MethodType, types.UnboundMethodType, types.BuiltinFunctionType, types.BuiltinMethodType ) 45 45 typesInstances = (object, types.InstanceType) 46 46 typesRequireBinding = typesMethods + typesInstances … … 77 77 elif isinstance(callback, typesMethods): 78 78 # Wrap up the method and potential instance 79 if callback.im_selfis not None:79 if getattr(callback, 'im_self', None) is not None: 80 80 self.im_self = weakref.ref(callback.im_self) 81 self.im_func = callback.im_func81 self.im_func = getattr(callback, 'im_func', callback) 82 82 elif isinstance(callback, typesInstances): 83 83 # This is a "callable object", make a weakref to it
