title: Python Tkinter: Insert objects into listbox, and then get them out (not as string)
body: <p>I have a listbox that displays some objects:</p>
  
  <pre><code># extra is some array of 'extra' objects I get from a database
  self.extrasList = Listbox(self, selectmode='multiple')
  self.extrasList.pack(fill=X, expand=True)
  for extra in extras:
      self.extrasList.insert(END, extra)
  </code></pre>
  
  <p>The <code>extra</code> objects have their <code>__str__</code> overridden, so they display just fine.</p>
  
  <p>However, when I then later do:</p>
  
  <pre><code>selection = self.extrasList.curselection()
  extra = self.extrasList.get(selection[0]) #this is now a string rather than the proper 'extra' object
  </code></pre>
  
  <p>Is there a way to get the object back out of the listbox?
  Rather than a string?</p>
  
  <p>The only thing I could find was to manually keep the listbox and an other list in sync. But this can be quite errorprone.</p>