Sayth Renshaw <flebber.c...@gmail.com> writes: > What is the best way to inplace alter a list going into a postgres > database using split but being sure that the order of items remains > correct.
That's a trick question. The best way to modify fields of a record is not with a list. Instead, you should get the record in the form of a mapping (such as Python's built-in mapping type, ‘dict’) and alter the fields *by name*. Ony when it's time to serialise the data should you then convert it to a list, extracting by the sequence of field names (‘horseattrs’ in your example). -- \ “Firmness in decision is often merely a form of stupidity. It | `\ indicates an inability to think the same thing out twice.” | _o__) —Henry L. Mencken | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list