--- IronPython/Runtime/Function.cs.orig 2006-05-10 11:47:47.000000000 +0900 +++ IronPython/Runtime/Function.cs 2006-05-10 12:18:55.000000000 +0900 @@ -835,7 +835,7 @@ } [PythonType("instancemethod")] - public sealed partial class Method : IFastCallable, IFancyCallable, IDescriptor, IWeakReferenceable, IDynamicObject { + public sealed partial class Method : IFastCallable, IFancyCallable, IDescriptor, IWeakReferenceable, IDynamicObject, ICustomAttributes { //??? can I type this to Function private object func; private object inst; @@ -985,6 +985,30 @@ } #endregion + #region ICustomAttributes Members + + public bool TryGetAttr(ICallerContext context, SymbolId name, out object value) { + return ((PythonFunction)func).TryGetAttr(context , name, out value); + } + + public void SetAttr(ICallerContext context, SymbolId name, object value) { + GetDynamicType().SetAttr(context, func, name, value); + } + + public void DeleteAttr(ICallerContext context, SymbolId name) { + GetDynamicType().DelAttr(context, func, name); + } + + public List GetAttrNames(ICallerContext context) { + return GetDynamicType().GetAttrNames(context, func); + } + + public IDictionary GetAttrDict(ICallerContext context) { + return GetDynamicType().GetAttrDict(context, func); + } + + #endregion + #region IWeakReferenceable Members WeakRefTracker IWeakReferenceable.GetWeakRef() {