I'd skip the loop and just make this explicit. i.e. `url += '&field=%(field)s&sorder=%(sorder)s' % sort`, just for readabilities sake.