Origin of eval()-ing in separate namespace object

rusi rustompmody at gmail.com
Sun Dec 8 08:45:01 EST 2013


On Sunday, December 8, 2013 4:05:54 PM UTC+5:30, Kalinni Gorzkis wrote:
> By which languages(s) Python was inspired to support evaluating expressions and executing statements in a separate “namespace” object?

> This syntax:
> eval(expression,globals) or exec(code,globals)
> What is the origin of the functionality provided by the globals argument?

Been here since the days of scheme at least
http://docs.racket-lang.org/guide/eval.html#%28part._namespaces%29

For the record lisp was conceptualized in the late 50s and implemented
by 1960.  By the 80s it was widely regarded as the premier AI language
but it was also clear to users that the scoping rules were terribly
wrong.  So a number of the then lisps coalesced and re-separated into
2 major dialects -- scheme and common lisp.

I expect it -- 2 argument eval -- goes all the way back to the earliest lisp 
but Ive not access to the history.



More information about the Python-list mailing list