By subclassing raw objects things like iteration become much easier. Calling (map round [1.0 2.3 4.3]) will now work because the vector class inherits from the ImmutableVector class which is an iterator that map will accept.
I also added a new ComparableIter class to allow comparison between PyClojure lists and vectors, python lists, and 3rd party iterables. The addition of the __ne__ method to ComparableExpr was because Atom() != Atom() was the same as Atom() == Atom(), which wasn't correct.
Also added some new tests. I used the coverage plugin to test the coverage and core is at 94%, with the majority of untested methods being __repr__ or something similar.
By subclassing raw objects things like iteration become much easier. Calling
(map round [1.0 2.3 4.3])
will now work because the vector class inherits from the ImmutableVector class which is an iterator that map will accept.I also added a new ComparableIter class to allow comparison between PyClojure lists and vectors, python lists, and 3rd party iterables. The addition of the
__ne__
method to ComparableExpr was becauseAtom() != Atom()
was the same asAtom() == Atom()
, which wasn't correct.Also added some new tests. I used the coverage plugin to test the coverage and core is at 94%, with the majority of untested methods being
__repr__
or something similar.