title: Python Implementing a Priority Queue
body: <p>I am trying to make a priority queue without using the Queue module. I have made a class PriorityQueue() and I am trying to create a mk function that takes no arguments and returns an empty queue but can't seem to figure out how. my task function is here:</p>
  
  <pre><code>class Task():
  
      __slots__ = ('name', priority)
  
  def mkTask(myName, myPriority):
      t = Task()
      t.name = myName
      t.priority = myPriority
      return t
  </code></pre>
  
  <p>What I have so far for my PriorityQueue class and a function to check if the queue is empty is this:</p>
  
  <pre><code>class PriorityQueue():
      def __init__(queue):
          queue.length = 0
          queue.first = None
          queue.last = None
  
  def is_empty(queue):
      return(queue.length == 0)
  </code></pre>
  
  <p>I can't seem to figure out how to create an instance of the Queue and insert elements of a specific Task into the Queue.</p>