[Python-checkins] CVS: python/dist/src/Doc/lib libbinascii.tex,1.17,1.18

Barry Warsaw python-dev@python.org
Mon, 14 Aug 2000 23:08:02 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv2886

Modified Files:
	libbinascii.tex 
Log Message:
Describe the b2a_hex() and a2b_hex() functions (a.k.a. hexlify() and
unhexlify() respectively).


Index: libbinascii.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbinascii.tex,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** libbinascii.tex	2000/07/16 19:01:09	1.17
--- libbinascii.tex	2000/08/15 06:08:00	1.18
***************
*** 85,88 ****
--- 85,103 ----
  \end{funcdesc}
   
+ \begin{funcdesc}{b2a_hex}{data}
+ Return the hexadecimal representation of the binary \var{data}.  Every
+ byte of \var{data} is converted into the corresponding 2-digit hex
+ representation.  The resulting string is therefore, twice as long as
+ the length of \var{data}.  This function is also available as
+ \function{hexlify()}.
+ \end{funcdesc}
+ 
+ \begin{funcdesc}{a2b_hex}{hexstr}
+ Return the binary data represented by the hexadecimal string
+ \var{hexstr}.  This function is the inverse of \function{b2a_hex()}.
+ \var{hexstr} must contain an even number of hexadecimal digits (which
+ can be upper or lower case), otherwise a \exception{TypeError} is
+ raised.  This function is also available as \function{unhexlify()}.
+ 
  \begin{excdesc}{Error}
  Exception raised on errors. These are usually programming errors.