diff -r b6ee02acaae9 Doc/library/functions.rst --- a/Doc/library/functions.rst Wed Nov 26 21:17:53 2014 -0800 +++ b/Doc/library/functions.rst Wed Jan 14 20:42:15 2015 -0800 @@ -756,26 +756,30 @@ are always available. They are listed h .. class:: list([iterable]) :noindex: Rather than being a function, :class:`list` is actually a mutable sequence type, as documented in :ref:`typesseq-list` and :ref:`typesseq`. .. function:: locals() Update and return a dictionary representing the current local symbol table. - Free variables are returned by :func:`locals` when it is called in function + Non-local names are returned by :func:`locals` when it is called in function blocks, but not in class blocks. .. note:: - The contents of this dictionary should not be modified; changes may not - affect the values of local and free variables used by the interpreter. + The dictionary returned by locals() is an accurate snapshot of the local + namespace at the time it is called. 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. Holding a reference to the dictionary may + produce surprising effects. .. function:: map(function, iterable, ...) Return an iterator that applies *function* to every item of *iterable*, yielding the results. If additional *iterable* arguments are passed, *function* must take that many arguments and is applied to the items from all iterables in parallel. With multiple iterables, the iterator stops when the shortest iterable is exhausted. For cases where the function inputs are already arranged into argument tuples, see :func:`itertools.starmap`\.