[Python-ideas] Symbolic expressions (or: partials and closures from the inside out)

Nathan Rice nathan.alexander.rice at gmail.com
Sat Jan 14 21:13:36 CET 2012

On Sat, Jan 14, 2012 at 1:27 AM, Carl M. Johnson
<cmjohnson.mailinglist at gmail.com> wrote:
> You guys know this can more or less be done in Python today, right?

I did mention in the first post that I am the author of a library that
does this right? :D

The issue is of consistency.  some functions can break out of this
behavior.  Some "type" functions also want to behave a certain way
regardless of input (which makes sense in most cases but breaks
chaining symbolic expressions).

Additionally, the amount of code required to do that sort of object
proxying is really obnoxious.  Things like operator methods should be
hooked into__getattribute__ on symbolic objects.

There are also a LOT of neat possibilities that come out of symbolic
objects, for instance, function templates, fairly easy currying and
generation of closed form solutions by performing calculations on
functions rather than data.


More information about the Python-ideas mailing list