title: Python - Linked List Issue and Relevance
body: <p>I am working on a client/server to make a simple chat. Client is in VB and 
  server in python.</p>
  
  <p>I would like to make my server stock my message, and i though the smartest was to build a linked list (I am a novice in python but much more advanced in C#).</p>
  
  <p>What i try to store is composed of :</p>
  
  <ul>
  <li>the recipient (it is called dest here)</li>
  <li>the message (called msg)</li>
  </ul>
  
  <p>I dont know how many, and i will overwrite if I have a new message for someone who already have a message stored</p>
  
  <p>I tried that as class</p>
  
  <pre><code>class tabmessage:
      def __init__(self, dest=None,msg=None, next=None): 
          self.dest = dest
          self.msg = msg
          self.next = None
  </code></pre>
  
  <p>and that as call</p>
  
  <pre><code>#I create the top of the chain on the beginning
  messages = tabmessage(dest='Control',msg='Message Integrity')
  </code></pre>
  
  <p>... Then in a function later</p>
  
  <pre><code>#Setting the top of the chain
  (d,m,s) = (messages.dest,messages.msg,messages.next)
  #Looking for a similar dest in chain and getting at the end at the same time
  while True:
          if (d == tempdest):
              m = (tempmsg+".")[:-1]
              print("Overwrite of msg for" + d + " : " + m);
              return
          if (s is None):
              break
          (d,m,s)=(s.dest,s.msg,s.next)
  #If I did not found it i try to add it to the chain
  s = tabmessage(dest=(tempdest+".")[:-1],msg=(tempmsg+".")[:-1])
  print("Trying to add : " + s.dest + " : " + s. msg)
  </code></pre>
  
  <p>The last print looks ok : </p>
  
  <blockquote>
    <p>Trying to add : User : This is my message</p>
  </blockquote>
  
  <p>but if i do :</p>
  
  <pre><code>print("Trying to add : " + messages.next.dest + " : " + messages.next. msg)
  </code></pre>
  
  <p>An error occured (NoneType don't have a dest element ...), so the top is still alone.</p>
  
  <p>Or maybe if there is smarter way to do it in python ?</p>