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

4.24. SkipList.__len__()

The special method .__len__() is called when the len() function is applied to a _SkipItem. It returns the value of the internal .__nItems.

pyskip.py
# - - -   S k i p L i s t . _ _ l e n _ _   - - -

    def __len__ ( self ):
        """Returns the number of child elements."""
        return self.__nItems