New submission from Steven D'Aprano <steve+pyt...@pearwood.info>: The obvious documentation for locals() fails to mention that when called from the top level of a module (outside of a function or class body) it returns the same dict as globals().
https://docs.python.org/2/library/functions.html#locals ---------- assignee: docs@python components: Documentation messages: 308947 nosy: docs@python, steven.daprano priority: normal severity: normal status: open title: Document that locals() may return globals() type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32413> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com