[issue32413] Document that locals() may return globals()

2019-04-02 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32413] Document that locals() may return globals()

2019-04-02 Thread miss-islington
miss-islington added the comment: New changeset ef516d11c1a0f885dba0aba8cf5366502077cdd4 by Miss Islington (bot) in branch '3.7': bpo-32413: Add documentation that at the module level, locals(), globals() are the same dictionary (GH-5004)

[issue32413] Document that locals() may return globals()

2019-04-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +12592 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32413] Document that locals() may return globals()

2019-04-01 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32413] Document that locals() may return globals()

2018-01-02 Thread Martin Panter
Martin Panter added the comment: FWIW a few years ago I wrote a patch for Issue 17546 that documents three personalities of “locals”, including: * At the module level, the dictionary returned is the global symbol table, also returned by :func:`globals`. --

[issue32413] Document that locals() may return globals()

2017-12-24 Thread Srinivas Reddy T
Srinivas Reddy T added the comment: Done. exec(...)'s documentation covers raymond's comment. -- nosy: +thatiparthy ___ Python tracker

[issue32413] Document that locals() may return globals()

2017-12-24 Thread Srinivas Reddy T
Change by Srinivas Reddy T : -- keywords: +patch pull_requests: +4893 stage: -> patch review ___ Python tracker ___

[issue32413] Document that locals() may return globals()

2017-12-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, this isn't a quirk of how locals() works. Instead, it reflects the more interesting reality that at the top level, locals and globals *are* the same dictionary. Also, that is not the only occurrence -- if exec() is

[issue32413] Document that locals() may return globals()

2017-12-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue32413] Document that locals() may return globals()

2017-12-22 Thread Steven D'Aprano
New submission from Steven D'Aprano : 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().