File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -144,11 +144,13 @@ def get_lexical_variables(tree, collect_locals=True):
144144
145145 This means that the `collect_locals=True` mode leads to a purely static
146146 (i.e. purely lexical) analysis. Any local name defined anywhere in the
147- function body is considered to be in scope.
147+ function body is considered to be in scope. (In parts of the scope,
148+ the name may still be unbound; see Python's `UnboundLocalError`.)
148149
149150 If `collect_locals` is `False`, assignment LHSs are ignored. It is then
150- the caller's responsibility to perform the appropriate dynamic analysis.
151- See `scoped_walker` for an example of how to do that.
151+ the caller's responsibility to perform the appropriate dynamic analysis,
152+ although doing so doesn't fully make sense. See `scoped_walker` for an
153+ example of how to do that.
152154
153155 - names of comprehension targets in ``ListComp``, ``SetComp``,
154156 ``GeneratorExp``, ``DictComp``
You can’t perform that action at this time.
0 commit comments