[Python-checkins] python/dist/src/Lib/email Utils.py,1.19,1.20

barry@users.sourceforge.net barry@users.sourceforge.net
Mon, 30 Sep 2002 17:44:16 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv11254

Modified Files:
	Utils.py 
Log Message:
Docstring consistency with the updated .tex files.


Index: Utils.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Utils.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Utils.py	28 Sep 2002 20:49:57 -0000	1.19
--- Utils.py	1 Oct 2002 00:44:13 -0000	1.20
***************
*** 222,231 ****
  
  def make_msgid(idstring=None):
!     """Returns a string suitable for RFC 2822 compliant Message-ID:, e.g:
  
      <20020201195627.33539.96671@nightshade.la.mastaler.com>
  
      Optional idstring if given is a string used to strengthen the
!     uniqueness of the Message-ID, otherwise an empty string is used.
      """
      timeval = time.time()
--- 222,231 ----
  
  def make_msgid(idstring=None):
!     """Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
  
      <20020201195627.33539.96671@nightshade.la.mastaler.com>
  
      Optional idstring if given is a string used to strengthen the
!     uniqueness of the message id.
      """
      timeval = time.time()
***************
*** 287,297 ****
  
  def encode_rfc2231(s, charset=None, language=None):
!     """Encode string according to RFC 2231"""
      import urllib
      s = urllib.quote(s, safe='')
      if charset is None and language is None:
          return s
!     else:
!         return "%s'%s'%s" % (charset, language, s)
  
  
--- 287,303 ----
  
  def encode_rfc2231(s, charset=None, language=None):
!     """Encode string according to RFC 2231.
! 
!     If neither charset nor language is given, then s is returned as-is.  If
!     charset is given but not language, the string is encoded using the empty
!     string for language.
!     """
      import urllib
      s = urllib.quote(s, safe='')
      if charset is None and language is None:
          return s
!     if language is None:
!         language = ''
!     return "%s'%s'%s" % (charset, language, s)
  
  
***************
*** 299,303 ****
  
  def decode_params(params):
!     """Decode parameters list according to RFC 2231"""
      new_params = []
      # maps parameter's name to a list of continuations
--- 305,312 ----
  
  def decode_params(params):
!     """Decode parameters list according to RFC 2231.
! 
!     params is a sequence of 2-tuples containing (content type, string value).
!     """
      new_params = []
      # maps parameter's name to a list of continuations