A fork of Gustavo Niemeyer's work (http://labix.org/python-constraint) with some improvements