revise python tree