memory_pickle backend support

#11 Merged at 6e0491a
  1. jvanasco

refactored the suggested MemoryPickleBackend into a subclass of MemoryBackend ; an internal flag in the class decides if we pickle or not.

Also updated the get_multi and set_multi in MemoryBackend to just proxy multiple calls to get/set. This simplified the readability and code organization, though there will be a slight performance drop ( multiple function calls vs direct dictionary access ).

added the generic test case; it passes.

did not commit the ( 2 line addition ) to docs, as it was marked in git-ignore.

Comments (4)

  1. Michael Bayer repo owner

    yeah whats up with the .gitignore, I think because "build/" is in the file it blocks "docs/build" ? whats the correct format for that, I just want the root "build/" in .gitignore

  2. jvanasco author


    sorry about the PEP. when my eyes are tired (like today) I make egregious use of whitespace , so i can focus on the content better. i forgot to clean that out.

    i updated the .gitignore ; you may want to reject the changes.

    the ignore syntax is weird, because it seems to apply the gitignore file to every item in a directory -- the paths of elements of the files are essentially relative, not absolute.:

    • ending a line entry with "/" specifies that it is a directory , but...
    • patterns generally match for all entities under the root. so...
    • build/ blocks out every build subdirectory, just like 'README' blocks out every README file.
    • if you want to block out a specific build directory, or file, then you do /README or /path/to/build/

    thought of differently, unless you explicitly start with '/', it treats everything as a relative pattern, not absolute to the root path of the repo.

    at least that's my general understanding, and stackoverflow seems to confirm it.