selectors.py
branchstable
changeset 1907 0f3363d24239
parent 1784 f0fb914e57db
child 1909 58374d1f6d9b
equal deleted inserted replaced
1905:9c96dd7cc624 1907:0f3363d24239
   112         TRACED_OIDS = ()
   112         TRACED_OIDS = ()
   113         return traceback is None
   113         return traceback is None
   114 
   114 
   115 
   115 
   116 def score_interface(cls_or_inst, cls, iface):
   116 def score_interface(cls_or_inst, cls, iface):
   117     """Return true if the give object (maybe an instance or class) implements
   117     """Return XXX if the give object (maybe an instance or class) implements
   118     the interface.
   118     the interface.
   119     """
   119     """
   120     if getattr(iface, '__registry__', None) == 'etypes':
   120     if getattr(iface, '__registry__', None) == 'etypes':
   121         # adjust score if the interface is an entity class
   121         # adjust score if the interface is an entity class
   122         parents = cls_or_inst.parent_classes()
   122         parents = cls_or_inst.parent_classes()