brython-dev/brython — pull request #9 by JamesHutchison (2014-09-19 10:10:22+00:00)
Title: Local storage improvements

This adds several improvements to localStorage and sessionStorage:

- Adds classes `Local_Storage` and `Session_Storage` which allow you to operate on the localStorage or sessionStorage like a `dict`. I realize this violates typical Python naming convention, but it's to avoid conflicts with browsers that treat localStorage and sessionStorage as something you can access case-insensitive. These classes also enforce the keys and values being strings, since that is the only thing supported by localStorage.
- Adds class `Object_Storage` which automatically pickles/unpickles objects. __init__ argument is the storage to use
- Usage example: `object_storage = Object_Storage(Local_Storage())`

This also adds tests, and additionally adds the null tests from my previous pull request into the test dropdown. I've put them in their own category, Javascript, since these are python <-> javascript focused, and I don't see any other tests that fall into this category.