[Python-ideas] One more time... lambda function <--- from *** signature def.

Chris Angelico rosuav at gmail.com
Tue Mar 4 23:40:09 CET 2014


On Wed, Mar 5, 2014 at 9:31 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Does `b[1]` give you an unevaluated thunk object?

I would say that `b[1]` should create a brand new thunk object of that
expression. On evaluation of that, it'll look up b, subscript it, and
touch the thunk. When it does, it Schrodingers itself into a value and
that's that.

In my opinion, __getitem__ isn't a problem, but __setitem__ is.
Somewhere along the way, you have to be able to "hold" a thunk as a
thunk. I've no idea how that works when you pass it around from
function to function.

ChrisA


More information about the Python-ideas mailing list