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
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