parameters: (value, endchars)
return_statement: return invalid_mailbox, value
docstring: Read everything up to one of the chars in endchars.
  
      This is outside the formal grammar.  The InvalidMailbox TokenList that is
      returned acts like a Mailbox, but the data attributes are None.
docstring_summary: Read everything up to one of the chars in endchars.
docstring_tokens: Read everything up to one of the chars in endchars .
function: def get_invalid_mailbox(value, endchars):
      """ Read everything up to one of the chars in endchars.
  
      This is outside the formal grammar.  The InvalidMailbox TokenList that is
      returned acts like a Mailbox, but the data attributes are None.
  
      """
      invalid_mailbox = InvalidMailbox()
      while value and value[0] not in endchars:
          if value[0] in PHRASE_ENDS:
              invalid_mailbox.append(ValueTerminal(value[0],
                                                   'misplaced-special'))
              value = value[1:]
          else:
              token, value = get_phrase(value)
              invalid_mailbox.append(token)
      return invalid_mailbox, value
function_tokens: def get_invalid_mailbox ( value , endchars ) : invalid_mailbox = InvalidMailbox ( ) while value and value [ 0 ] not in endchars : if value [ 0 ] in PHRASE_ENDS : invalid_mailbox . append ( ValueTerminal ( value [ 0 ] , 'misplaced-special' ) ) value = value [ 1 : ] else : token , value = get_phrase ( value ) invalid_mailbox . append ( token ) return invalid_mailbox , value