On Sat, Jan 3, 2015 at 1:03 PM, Aaron Meurer <
asme...@gmail.com> wrote:
> If you always want to evaluate to a given expression, then there is no point
> in using a Function subclass over a Python function.
>
> In your example, f(x) is nothing more than a shortcut for x**2. fx = f(x) is
> semantically equivalent to fx = x**2.
>
> The point of Function is that it can be unevaluated. This is useful because
> sometimes you don't have an evaluation (like sin(x) or sin(1) should both
> stay as-is), and also because it lets you simplify expressions so that they
> are in terms of a single function, rather than a large expression (Python
> functions always evaluate eagerly, so there is no way to use f(x) in an
> expression with your example; it will always be replaced with x**2 as soon
> as it is evaluated).