I think you should use `pylearn2.utils.safe_zip` (which throws an error if the two zipped iterables do not have the same length) here. One CompositeSpace with components `(VectorSpace(dim=1), VectorSpace(dim=2))` and another with components `(VectorSpace(dim=1), VectorSpace(dim=2), VectorSpace(dim=3))` would be considered equal in the current implementation.