def encode(self, index):
        """Encode index based on internal tables and return byte code.

        An index probes into the various axes of the multidimensional,
        virtual grid that a key represents. The index is evaluated, and
        the value at its coordinates is returned by running this method."""
        assert len(index) == self.__dimensions, \
               'Index size is not compatible with key dimensions!'
        *probes, current = index
        return self.__encoder[(sum(table[probe] for table, probe in
            zip(self.__axes, probes)) + current) % self.__size]
Encode index based on internal tables and return byte code.

        An index probes into the various axes of the multidimensional,
        virtual grid that a key represents. The index is evaluated, and
        the value at its coordinates is returned by running this method.
recipes/Python/578075_Markov_Encryption_Module/recipe-578075.py