At 07:37 AM 4/7/2006, Jim Jewett wrote: >On 4/7/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > Guido wrote: > > > mros = tuple(t.__mro__ for t in types) > > > n = len(mros) > > > candidates = [sig for sig in self.registry > > > if len(sig) == n and > > > all(t in mro for t, mro in zip(sig, mros))] > > > > I believe this can be simplified to: > > n = len(types) > > candidates = [sig for sig in self.registry > > if len(sig) == n and > > all(issubclass(s,t) for s,t in zip(sig, types))] > >Am I going nuts, or should that issubclass test be reversed?
No, you're right, I goofed. To me, the "signature" was what the function was *called* with, so it seemed to read correctly to me. i.e., I read it as "the calling signature item is a subclass of the target method's type"... which is the right idea, but the wrong variables. :) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com