Tried the example in the README, but it failed and only gave an empty solution when writing the constraint as string ("a*2==b"). The same example with a lambda constraint worked fine.
Further investigation reveals that, after the getSolutions() call, variable a just loses its domain, that is problem._variables gives a=[].
Affected versions: 2.3.0 and 2.3.1 from PyPI.
I downgraded to version 2.2.3 and there the string constraint example worked, too.
Note: you should really write tests for the code in the README, too, to ensure it works.
Tried the example in the README, but it failed and only gave an empty solution when writing the constraint as string (
"a*2==b"). The same example with a lambda constraint worked fine.Further investigation reveals that, after the getSolutions() call, variable
ajust loses its domain, that isproblem._variablesgivesa=[].Affected versions: 2.3.0 and 2.3.1 from PyPI.
I downgraded to version 2.2.3 and there the string constraint example worked, too.
Note: you should really write tests for the code in the README, too, to ensure it works.