python2 does not automatically use __eq__ for __ne__ implementation. Everything else in here seems to work with python2, but by not implementing __ne__ , this check raises an error whenever restarting from an existing database in python 2.
Bug demonstration:
import chocolate as choco
space0 = choco.space.Space({'a': choco.uniform(0, 1)})
space1 = choco.space.Space({'a': choco.uniform(0, 1)})
print(space0 == space1) # True, as expected
print(space0 != space1) # True <-------------- very unexpected
print(space0.spaces == space1.spaces) # True, as expected
print(space0.spaces != space1.spaces) # False, as expected
Sorry about the whitespace changes - only just noticed them... happy to roll back and re-issue if that's a problem...
python2 does not automatically use
__eq__
for__ne__
implementation. Everything else in here seems to work with python2, but by not implementing__ne__
, this check raises an error whenever restarting from an existing database in python 2.Bug demonstration:
Sorry about the whitespace changes - only just noticed them... happy to roll back and re-issue if that's a problem...