[issue17546] Document the circumstances where the locals() dict get updated

2016-12-02 Thread Martin Panter
Martin Panter added the comment: Some minor tweaks to my earlier patch: * list comprehension → comprehension * time it is called → time of the call -- versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file45735/locals_doc.04.patch

[issue17546] Document the circumstances where the locals() dict get updated

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: -ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546 ___ ___ Python-bugs-list

[issue17546] Document the circumstances where the locals() dict get updated

2015-06-29 Thread Martin Panter
Martin Panter added the comment: I quickly scanned through the email thread from Issue 17960. I guess it makes sense to specify that locals() can be used to directly get a class’s namespace. Probably doesn’t hurt to say locals() is equivalent to globals() at module level, although this seems

[issue17546] Document the circumstances where the locals() dict get updated

2015-06-29 Thread Martin Panter
Martin Panter added the comment: Here is another attempt with different words: ''' .. note:: The dictionary returned by :func:`locals` is an accurate snapshot of the local namespace at the time it is called. If the namespace changes after the call, the dictionary may become out of date,

[issue17546] Document the circumstances where the locals() dict get updated

2015-06-29 Thread Nick Coghlan
Nick Coghlan added the comment: I mostly like Martin's suggested wording, but would also note that I filed issue 17960 to tighten up the requirements for when we expect assigning to locals() to work. To save folks reading the whole referenced email, I think it would be worth defining that

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-15 Thread R. David Murray
R. David Murray added the comment: Yeah, the question of thread-safety in regards to what we are talking about here also occurred to me. That is, the wording makes one wonder if locals is thread safe or not. I don't see your suggested wording as making it clearer, though. The problem is

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-15 Thread R. David Murray
R. David Murray added the comment: Your formulation is more concise, thank you. I suggest dropping the word 'additionally'. Also, how it does would be better phrased as how it changes, I think. (It really should be whether and how it changes, but in deference to Anatoly's 'advanced English'

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-15 Thread Martin Panter
Martin Panter added the comment: What about instead of ''' Whether changes to one are reflected in the other after the call returns is undefined; additionally, the dictionary may change unpredictably after the call, and how it does is implementation-specific. ''' substitue this wording: '''

[issue17546] Document the circumstances where the locals() dict get updated

2015-01-14 Thread Ethan Furman
Ethan Furman added the comment: Combined the second and last lines, discarded duplication. -- nosy: +ethan.furman versions: +Python 3.5 Added file: http://bugs.python.org/file37711/issue17546.stoneleaf.01.patch ___ Python tracker

[issue17546] Document the circumstances where the locals() dict get updated

2013-05-02 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ncoghlan stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546 ___

[issue17546] Document the circumstances where the locals() dict get updated

2013-03-31 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17546 ___ ___ Python-bugs-list

[issue17546] Document the circumstances where the locals() dict get updated

2013-03-30 Thread R. David Murray
R. David Murray added the comment: Hmm. Perhaps the last sentence could be ... because changes to the local dict propagating to the local namespace cannot be relied upon to either happen or not happen. That would make it less redundant, since it would essentially be referencing the previous

[issue17546] Document the circumstances where the locals() dict get updated

2013-03-30 Thread anatoly techtonik
anatoly techtonik added the comment: ... cannot be relied upon to either happen or not happen... IMHO this phrase is from Advanced English course. The original included the caution against modifying it, and I think it is valid because of the inconsistent behavior. Perhaps it could be