As described in Section 4.21, the Slice compilers can optionally generate checksums of Slice definitions. For
slice2py, the
‑‑checksum option causes the compiler to generate code that adds checksums to the dictionary
Ice.sliceChecksums. The checksums are installed automatically when the Python code is first imported; no action is required by the application.
In order to verify a server’s checksums, a client could simply compare the dictionaries using the comparison operator. However, this is not feasible if it is possible that the server might return a superset of the client’s checksums. A more general solution is to iterate over the local checksums as demonstrated below: