sympy/sympy — pull request #2243 by jrioux (2013-07-03 11:26:15+00:00)
Title: Replace Class(*args) by self.func(*args).

Addresses nonexhaustively the subclassing problem. For example, when you subclass Add, and then perform some operations on an instance of your subclass, you expect an instance of your subclass to be returned. Previously you often would get an instance of Add.

Part of issue 3652: Make sure classes play nice with potential subclasses
http://code.google.com/p/sympy/issues/detail?id=3652