[ADD] In Python add check in _constraint