Next / Previous / Contents / TCC Help System / NM Tech homepage

4.9. SkipList.__keyOf()

This function finds the child's key. If there is no key function, use the child itself as the key.

pyskip.py
# - - -   S k i p L i s t . _ _ k e y O f   - - -

    def __keyOf ( self, child ):
        """Return the child's key.

          [ child is in the child domain of self ->
              return key-of ( child ) ]
        """
        if self.keyFun:
            return self.keyFun ( child )
        else:
            return child