def _construct_target_list(targets):
 target_entries = []
 for entry in targets:
  if (not isinstance(entry, Gtk.TargetEntry)):
   entry = Gtk.TargetEntry.new(*entry)
  target_entries.append(entry)
 return target_entries

def _construct_target_list ( targets ) : target_entries = [ ] for entry in targets : if ( not isinstance ( entry , Gtk . TargetEntry ) ) : entry = Gtk . TargetEntry . new ( * entry ) target_entries . append ( entry ) return target_entries
create a list of targetentry items from a list of tuples in the form the list can also contain existing targetentry items in which case the existing entry is re-used in the return list .