added python doc support and fixed a bug in constraint reducement