I have the following code snippet in which I am trying to override a method:
import Queue
class PriorityQueue(Queue.PriorityQueue):
def put(self, item):
super(PriorityQueue, self).put((item.priority, item))
However, when I run it, I get an exception TypeError:
super() argument 1 must be type, not classobj
What is the problem?
source
share