def __repr__(self):
        """
        This works for two different object:
            - Main ListNode object
            - Items of the ListNode (like instance of a class)
              which created while iterating on main ListNode object

        Returns:
            String representation of object.
        """
        if not self._is_item:
            return [obj for obj in self[:10]].__repr__()
        else:
            try:
                u = six.text_type(self)
            except (UnicodeEncodeError, UnicodeDecodeError):
                u = '[Bad Unicode data]'
            return six.text_type('<%s: %s>' % (self.__class__.__name__, u))
def __repr__ ( self ) : if not self . _is_item : return [ obj for obj in self [ : 10 ] ] . __repr__ ( ) else : try : u = six . text_type ( self ) except ( UnicodeEncodeError , UnicodeDecodeError ) : u = '[Bad Unicode data]' return six . text_type ( '<%s: %s>' % ( self . __class__ . __name__ , u ) )
This works for two different object:
            - Main ListNode object
            - Items of the ListNode (like instance of a class)
              which created while iterating on main ListNode object

        Returns:
            String representation of object.