Welcome, guest | Sign In | My Account | Store | Cart
import heapq

class Heap(list) :
	def __init__(self, * pos_arg, ** nam_arg) :
		list.__init__(self, * pos_arg, ** nam_arg)
		
	def pop(self) :
		return heapq.heappop(self)
		
	def push(self, item) :
		heapq.heappush(self, item)
		
	def pushpop(self, item) :
		return heapq.heappushpop(self, item)
		
	def poppush(self, itemp) :
		return heapq.replace(self, item)
	

Diff to Previous Revision

--- revision 1 2013-10-23 07:35:18
+++ revision 2 2015-09-17 12:41:15
@@ -1,6 +1,6 @@
 import heapq
 
-class heap(list) :
+class Heap(list) :
 	def __init__(self, * pos_arg, ** nam_arg) :
 		list.__init__(self, * pos_arg, ** nam_arg)
 		

History