[Python-checkins] CVS: python/nondist/peps pep-0247.txt,1.5,1.6

A.M. Kuchling akuchling@users.sourceforge.net
Mon, 24 Sep 2001 08:37:21 -0700


Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv12685

Modified Files:
	pep-0247.txt 
Log Message:
Clarify description of update() (Boyd Roberts)
Clarify description of new (Tim Peters)


Index: pep-0247.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0247.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pep-0247.txt	2001/09/20 15:48:02	1.5
--- pep-0247.txt	2001/09/24 15:37:19	1.6
***************
*** 27,39 ****
      new([key] , [string])
  
!         Create a new hashing object and return it.  You can now feed
!         arbitrary strings into the object using its update() method,
!         and can ask for the hash value at any time by calling its
!         digest() method.
! 
!         The 'string' parameter, if supplied, will be immediately
!         hashed into the object's starting state; an empty string or
!         None.  For keyed hashes such as HMAC, 'key' is a string
!         containing the starting key.  
  
          Arbitrary additional keyword arguments can be added to this
--- 27,41 ----
      new([key] , [string])
  
!         Create a new hashing object and return it.  The first form is
!         for hashes that are unkeyed; most hashes such as MD5 or SHA
!         are unkeyed.  For keyed hashes such as HMAC, 'key' is a string
!         containing the starting key.  The 'string' parameter, if
!         supplied, will be immediately hashed into the object's
!         starting state, as if obj.update(string) was called.
!         
!         After creating a hashing object, arbitrary strings can be fed
!         into the object using its update() method, and the hash value
!         can be obtained at any time by calling the object's digest()
!         method.
  
          Arbitrary additional keyword arguments can be added to this
***************
*** 89,95 ****
          method mustn't alter the object.
          
!     update(arg)
  
!         Update this hashing object with the string 'arg'.
  
      Hashing modules can define additional module-level functions or 
--- 91,99 ----
          method mustn't alter the object.
          
!     update(string)
  
!         Hash 'string' into the current state of the hashing object.
!         update() can be called any number of times during a hashing
!         object's lifetime.
  
      Hashing modules can define additional module-level functions or