parameters: (self, num)
docstring: :type num: int
          :rtype: None
docstring_summary: :type num: int
          :rtype: None
docstring_tokens: : type num : int : rtype : None
function: def addElement(self, num):
          """
          :type num: int
          :rtype: None
          """
          if len(self.__dq) == self.__m:
              self.__remove(self.__dq.popleft())
          self.__dq.append(num)
          self.__add(num)
function_tokens: def addElement ( self , num ) : if len ( self . __dq ) == self . __m : self . __remove ( self . __dq . popleft ( ) ) self . __dq . append ( num ) self . __add ( num )