def append(self, elem):
        """
        Return new deque with elem as the rightmost element.

        >>> pdeque([1, 2]).append(3)
        pdeque([1, 2, 3])
        """
        new_left_list, new_right_list, new_length = self._append(self._left_list, self._right_list, elem)
        return PDeque(new_left_list, new_right_list, new_length, self._maxlen)
def append ( self , elem ) : new_left_list , new_right_list , new_length = self . _append ( self . _left_list , self . _right_list , elem ) return PDeque ( new_left_list , new_right_list , new_length , self . _maxlen )
Return new deque with elem as the rightmost element.

        >>> pdeque([1, 2]).append(3)
        pdeque([1, 2, 3])