title: How to use Gtk3 GtkTreeRowReference in Python
body: <p>I'm trying to call Gtk3's <code>GtkTreeRowReference()</code> function without any success. I'm trying to delete multiple records from a <code>ListStore</code> using the associated TreeView's selection set to MULTIPLE mode. I want to save a <code>TreeRowReference</code> for each <code>ListStore</code> item pointed to in the selection and use those to delete the <code>ListStore</code> items because those paths are supposed to get updated as ListStore items reached earlier in the selection get deleted. I've found many references to using <code>TreeRowReferences</code> in PyGtk 2 and the tutorial for PyGObject refers to their use but gives no actual example. I've tried many ways to invoke <code>GtkTreeRowReference()</code> without success.  For example:</p>
  
  <pre><code>hit_rows = []
  for row in range(len(self.selection.get_selected_rows()):
      hit = self.selection.get_selected_rows()[row]
      hit_row = Gtk.TreeRowReference(liststore, hit)
      hit_rows.append(hit_row)
  </code></pre>
  
  <p>produces this fatal error message: <code>"TypeError: function takes at most 0 arguments (2 given)"</code> when my program hits the <code>Gtk.TreeRowReference</code> line. The rows in the selection already contain a reference to the <code>ListStore</code>, so tried again with only the selection row as an argument, but that just got the complaint that the function still insists on 0 arguments and I had tried to pass it 1 argument.</p>
  
  <p>I also tried things like this:</p>
  
  <pre><code>hit_rows = []
  for row in range(len(self.selection.get_selected_rows())):
      hit = self.selection.get_selected_rows()[row]
      hit_row = hit.GtkTreeRowReference()
      hit_rows.append(hit_row)
  </code></pre>
  
  <p>These efforts provoked Python to complain about an <code>"AttributeError: 'ListStore' object has no attribute 'GtkTreeRowReference'."</code> Varying the invocation to <code>TreeRowReference</code>,  <code>Gtk_TreeRowReference</code> and several other variations produced the same error message.</p>
  
  <p>Can anyone spare me a clue about how to use <code>Gtk.TreeRowReference</code> in PyGObject/Gtk3? As a relatively new and inexperienced Python programmer who's also new to Gtk, no doubt I've overlooked something breathtakingly obvious, but I'm stumped even after much internet searching.</p>