parameters: (addr)
docstring: Quote a subset of the email addresses defined by RFC 821.
  
      Should be able to handle anything rfc822.parseaddr can handle.
docstring_summary: Quote a subset of the email addresses defined by RFC 821.
docstring_tokens: Quote a subset of the email addresses defined by RFC 821 .
function: def quoteaddr(addr):
      """Quote a subset of the email addresses defined by RFC 821.
  
      Should be able to handle anything rfc822.parseaddr can handle.
      """
      m = (None, None)
      try:
          m = email.utils.parseaddr(addr)[1]
      except AttributeError:
          pass
      if m == (None, None):  # Indicates parse failure or AttributeError
          # something weird here.. punt -ddm
          return "<%s>" % addr
      elif m is None:
          # the sender wants an empty return address
          return "<>"
      else:
          return "<%s>" % m
function_tokens: def quoteaddr ( addr ) : m = ( None , None ) try : m = email . utils . parseaddr ( addr ) [ 1 ] except AttributeError : pass if m == ( None , None ) : # Indicates parse failure or AttributeError # something weird here.. punt -ddm return "<%s>" % addr elif m is None : # the sender wants an empty return address return "<>" else : return "<%s>" % m