piskvorky / sqlitedict

Persistent dict, backed by sqlite3 and pickle, multithread-safe.
Apache License 2.0
1.17k stars 131 forks source link

Python3port #15

Closed vrescobar closed 10 years ago

vrescobar commented 10 years ago

Here comes the version that works in 2 as well as in 3. I also added a repr() and corrected the bool problem.

I don't like so much the look of this try catch for the imports but I didn't like the idea if have an if-else for version import (just for the methods that are Python 2 specific).

As strange effect, now the dictionary is not returning the elements in the same order as they came in, but that was something which has never been granted in Python (any version).

Comments, feedback and review are welcome.

Please review the changes; I only made some fast tests, everything looks to be in order: $ nosetests3

...................................................

Ran 51 tests in 0.107s

OK $ nosetests2

...................................................

Ran 51 tests in 0.112s

OK

piskvorky commented 10 years ago

Thx @vrescobar , I'll get to it ASAP. We can use the new license too :+1: