Skip to content

Commit b4ff8f7

Browse files
committed
improve docstring
1 parent 80c09be commit b4ff8f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

unpythonic/syntax/scopeanalyzer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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``

0 commit comments

Comments
 (0)