<snip>

> It also refers to local and global variables, as vars() is effectively
> an alias for locals() if you don't pass an argument, and locals() is
> effectively an alias for globals() at module level:
>
> </snip

I was actually hoping that someone might propose to deprecate this
behavior.  Why do we need a cascade of namespaces looked up by `vars` (and
`locals`)?.  It seems to me that this just complicates what these functions
do and I don't see a clear reason for it.  Having a function do only one
thing might also help promote it's use in the cases where we want it to be
used (e.g. instead of accessing `__dict__` directly).

Of course, that might be too big a change to make any time soon... but a
guy can hope can't he?  :-)



-- 

[image: pattern-sig.png]

Matt Gilson // SOFTWARE ENGINEER

E: m...@getpattern.com // P: 603.892.7736

We’re looking for beta testers.  Go here
<https://www.getpattern.com/meetpattern> to sign up!
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to