title: What is wrong with my linked list?
body: <p>I am trying to create a class for nodes (it's suppsoed to be a system for a queue) to <code>import</code> in another program. I know that the other program is working fine since it works when <code>import</code>ing another type of queue that uses the same function names(that is based on Pythons regular <code>list</code>). With this queue-type however, I never seem to be able to get it to work. I'm sure that there are MANY problems with my code(Since I've been getting a big variety of error messages) and I would like some input on what i should change.</p>
  
  <p>Here is the code for the class:</p>
  
  <pre><code>class Node():
      def __init__(self, v=None, n=None):
          self.item=v
          self.next=n
  
      lastnode=__init__
  
      def put(self, v):
          Node.lastnode.next=self
          self.item=v
          self.next=None
          Node.lastnode=Node.lastnode.next
  
      def get(self):
          if Node.isempty(self):
              return None
          out=Node.__init__.next
          Node.__init__.next=out.next
          out.next=None
          return ut.item
  
      def isempty(self):
          if Node.lastnode==Node.__init__:
              return True
          else:
              return False
  </code></pre>
  
  <p>The <code>put</code> functions role is to put a new item/node last in the queue.</p>
  
  <p>The <code>get</code> functions role is to remove the first node from the queue and <code>return</code> its item.</p>
  
  <p>The <code>isempty</code> function is there to check if the queue is empty.</p>
  
  <p>Please give me some criticism on this.</p>