Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18916

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

References <CAOFbRmKxZ1RLs6b_taNAJ-4zVa+LG=5CWK5dwxTdL-TXfr9X2A@mail.gmail.com>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date 2012-01-13 08:45 -0500
Subject Re: [Python-ideas] Symbolic expressions (or: partials and closures from the inside out)
Newsgroups comp.lang.python
Message-ID <mailman.4713.1326462383.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Jan 12, 2012 at 3:45 PM, Nathan Rice
<nathan.alexander.rice@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:

http://doc.pypy.org/en/latest/objspace-proxies.html#the-thunk-object-space

-- Devin

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [Python-ideas] Symbolic expressions (or: partials and closures from the inside out) Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-01-13 08:45 -0500

csiph-web