sympy/sympy — pull request #2020 by shaunheilee (2013-04-17 16:31:51+00:00)
Title: Fix Issue 3594 (factor should return unhandled expr unchanged)

it is reported that:
>>> factor(Piecewise((x*(x+2),x<1)))
Piecewise((x**2 + 2*x, x < 1))

And here we request the result stay unchanged when factor do nothing in this situation.

http://code.google.com/p/sympy/issues/detail?id=3594