While an item’s UUID is normally used to compare items for sameness, there are times when it is useful to compare item instances with different UUIDs as, for example, while importing items from another repository. The Item class does not implement any Python comparison hook functions, comparing items is left to the implementors since meaningful item comparison depends on the items’ schema and on the knowledge of the implementor. For instance, not all attributes are equally relevant, some may even be completely irrelevant for comparison purposes. To help with this, a new API, hashItem(), was added to the Item class. Two items can be defined to be the ’same’ when their hash values are the same.
Read the rest of this entry »