On Wed, Mar 5, 2014 at 9:31 AM, Greg Ewing firstname.lastname@example.org wrote:
Does `b` give you an unevaluated thunk object?
I would say that `b` 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.