[Python-checkins] python/dist/src/Doc/lib emailmessage.tex, 1.11, 1.11.12.1

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Mon Aug 18 22:51:27 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv20184

Modified Files:
      Tag: release23-maint
	emailmessage.tex 
Log Message:
Update get_param() description to reflect changes to the docstring.


Index: emailmessage.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailmessage.tex,v
retrieving revision 1.11
retrieving revision 1.11.12.1
diff -C2 -d -r1.11 -r1.11.12.1
*** emailmessage.tex	18 Apr 2003 23:03:53 -0000	1.11
--- emailmessage.tex	19 Aug 2003 04:51:25 -0000	1.11.12.1
***************
*** 355,367 ****
  value can either be a string, or a 3-tuple if the parameter was
  \rfc{2231} encoded.  When it's a 3-tuple, the elements of the value are of
! the form \code{(CHARSET, LANGUAGE, VALUE)}, where \code{LANGUAGE} may
! be the empty string.  Your application should be prepared to deal with
! 3-tuple return values, which it can convert to a Unicode string like
! so:
  
  \begin{verbatim}
  param = msg.get_param('foo')
  if isinstance(param, tuple):
!     param = unicode(param[2], param[0])
  \end{verbatim}
  
--- 355,370 ----
  value can either be a string, or a 3-tuple if the parameter was
  \rfc{2231} encoded.  When it's a 3-tuple, the elements of the value are of
! the form \code{(CHARSET, LANGUAGE, VALUE)}.  Note that both \code{CHARSET} and
! \code{LANGUAGE} can be \code{None}, in which case you should consider
! \code{VALUE} to be encoded in the \code{us-ascii} charset.  You can
! usually ignore \code{LANGUAGE}.
! 
! Your application should be prepared to deal with 3-tuple return
! values, and can convert the parameter to a Unicode string like so:
  
  \begin{verbatim}
  param = msg.get_param('foo')
  if isinstance(param, tuple):
!     param = unicode(param[2], param[0] or 'us-ascii')
  \end{verbatim}
  





More information about the Python-checkins mailing list