On Tue, Jul 1, 2014 at 10:13 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: > Anyway, I'm sure there's something in SQL for "insert or update" or "on > duplicate", but that's an SQL question, not a Python question.
Not in standard SQL, no; there might be in SQLite, as a non-standard extension, but it's a fundamentally hard problem and it has issues. Frankly, though, I doubt the time cost of set operations is anything significant compared to the various queries against the database. ChrisA -- https://mail.python.org/mailman/listinfo/python-list