vregistry.py
branchstable
changeset 2078 362703bff3d4
parent 2077 50beca829273
child 2144 51c84d585456
child 2173 7fae9300b9f9
equal deleted inserted replaced
2077:50beca829273 2078:362703bff3d4
   214         else:
   214         else:
   215             vobjects = registry.setdefault(oid, [])
   215             vobjects = registry.setdefault(oid, [])
   216         # registered() is technically a classmethod but is not declared
   216         # registered() is technically a classmethod but is not declared
   217         # as such because we need to compose registered in some cases
   217         # as such because we need to compose registered in some cases
   218         vobject = obj.registered.im_func(obj, self)
   218         vobject = obj.registered.im_func(obj, self)
   219         assert not vobject in vobjects, vobject, \
   219         assert not vobject in vobjects, \
   220                'object %s is already registered' % vobject
   220                'object %s is already registered' % vobject
   221         assert callable(vobject.__select__), vobject
   221         assert callable(vobject.__select__), vobject
   222         vobjects.append(vobject)
   222         vobjects.append(vobject)
   223         try:
   223         try:
   224             vname = vobject.__name__
   224             vname = vobject.__name__