brownplt / lambda-py

Other
58 stars 10 forks source link

locals identifier gives NameError #27

Closed amtriathlon closed 11 years ago

amtriathlon commented 11 years ago

locals() desugaring is done at application time, so:

mylocals = locals print(mylocals())

gives NameError exception, super() has a similar problem.

anandology commented 11 years ago

I've implemented built-in function globals in my fork. I can take care of implementing locals, if no one else is working on it.

amtriathlon commented 11 years ago

Hi Anand, I've implemented this in multiple_inheritance branch since I need the activation record's stack to access self and class (https://github.com/brownplt/lambda-py/commit/8b9d151d945b39ac155016eefe545e9399a3ec1e), but it depends on the new (static) scope.