public static IntPtr mp_subscript(IntPtr tp, IntPtr idx) { MethodBinding self = (MethodBinding)GetManagedObject(tp); MethodInfo sig = MethodBinder.MatchByTypeSig(self.m.info, idx); if (sig == null) { return(Exceptions.RaiseTypeError( "No match found for signature" )); } MethodBinding mb = new MethodBinding(self.m, self.target); mb.info = sig; Runtime.Incref(mb.pyHandle); return(mb.pyHandle); }