On Wed, Oct 3, 2012 at 11:34 AM, Steven D'Aprano <st...@pearwood.info> wrote: > I find myself unable to choose between 2) and 4), which suggests that > the status quo wins and we keep the current behaviour.
What is the benefit of having a dict that represents a namespace, but whose mutations don't mutate said namespace? Compare with option 2, where the dict is mutable, and whose mutations mutate the namespace it represents. That behavior is altogether significantly less surprising. I've never understood why locals() returned a mutable dictionary either, except that Python has no immutable dictionary type. -- Devin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com