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

Martin Panter report at bugs.python.org
Mon Jun 29 17:09:56 CEST 2015

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 like a fairly redundant feature.

Here is locals_doc.03.patch, which uses my wording for function namespaces, and also adds more for class and global namespaces, as suggested by Nick.

Added file: http://bugs.python.org/file39833/locals_doc.03.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list