[Python-checkins] python/dist/src/Modules _heapqmodule.c,1.5,1.6

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Jun 20 05:07:56 EDT 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18236/Modules

Modified Files:
	_heapqmodule.c 
Log Message:
Improve the documented advice on how to best use heapq.heapreplace().



Index: _heapqmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_heapqmodule.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** _heapqmodule.c	15 Jun 2004 23:53:35 -0000	1.5
--- _heapqmodule.c	20 Jun 2004 09:07:52 -0000	1.6
***************
*** 187,191 ****
  more appropriate when using a fixed-size heap.  Note that the value\n\
  returned may be larger than item!  That constrains reasonable uses of\n\
! this routine.\n");
  
  static PyObject *
--- 187,192 ----
  more appropriate when using a fixed-size heap.  Note that the value\n\
  returned may be larger than item!  That constrains reasonable uses of\n\
! this routine unless written as part of a larger expression:\n\n\
!     result = item <= heap[0] and item  or  heapreplace(heap, item)\n");
  
  static PyObject *




More information about the Python-checkins mailing list