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

Devin Jeanpierre jeanpierreda at gmail.com
Fri Jan 13 14:45:38 CET 2012

On Thu, Jan 12, 2012 at 3:45 PM, Nathan Rice
<nathan.alexander.rice at gmail.com> wrote:
> I'm interested in fixing both issues. I believe both issues I've had
> could be solved by having a robust "symbolic object".  These objects
> would basically usable like ordinary objects, however upon any
> attribute access or other form of interaction, the object would
> basically short circuit the calling function, and return a symbolic
> object directly to the outer scope.  The symbolic object would behave
> like a generator function frozen at the point of attribute access, and
> upon send()-ing (or whatever method), it would behave exactly as if
> the values sent had been the ones passed in originally (ideally
> without consuming the generator).

I find the way you've formalized this a bit "weird". It looks like
you're suggesting adding laziness to Python.

If that's what you want, maybe you should try PyPy and the thunk object space:


-- Devin

More information about the Python-ideas mailing list