On Feb 26, 7:58Â am, Jeremy <jlcon...@gmail.com> wrote: > I have lots of data that I currently store in dictionaries. Â However, > the memory requirements are becoming a problem. Â I am considering > using a database of some sorts instead, but I have never used them > before. Â Would a database be more memory efficient than a dictionary? > I also need platform independence without having to install a database > and Python interface on all the platforms I'll be using. Â Is there > something built-in to Python that will allow me to do this?
If you had wall-to-wall unit tests, you could swap the database in incrementally ("Deprecation Refactor"). You would just add one database table, switch one client of one dictionary to use that table, pass all the tests, and integrate. Repeat until nobody uses the dicts, then trivially retire them. If you don't have unit tests, then you have a bigger problem than memory requirements. (You can throw $50 hardware at that!) -- Phlip http://penbird.tumblr.com/ -- http://mail.python.org/mailman/listinfo/python-list