Andrew Barnert wrote:
in Lisp, if you replace the setf macro,

Okay, maybe Lisp wasn't a good example. In the presence of macros,
all bets are off. :-( But at least if you haven't redefined the
universe, local bindings in Lisp behave predictably.

If you had code involving “x = 2” that stopped working
when you moved it from local to a module init function to the top level ...
> would you think “That’s ok, x isn’t
local, so I wasn’t expecting assignment to mean binding”?

I wouldn't think "x isn't local", because it still *is* local
from the point of view of that piece of code.

If we're talking about current Python, I definitely would think
something was broken, because assignment to a bare name, in any
context, isn't supposed to be able to do anything weird.

--
Greg
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/6MQ2PWVCKUQR7MDTCGESQLK3JOYNXLUY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to