Skip to content

Commit c1f970d

Browse files
committed
improve comments
1 parent 5b3a3cc commit c1f970d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unpythonic/syntax/scopeanalyzer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Lexical scoping support.
2+
"""Lexical scope analysis tools.
33
44
This is used to support interaction of the ``let[]`` and ``do[]`` macros
55
(which use ``env`` to simulate a lexical environment, with static name lookup
@@ -8,7 +8,9 @@
88
This module cares only about Python's standard scoping rules, but with a
99
small twist: assignments (creation of local variables) and local deletes
1010
are considered to take effect **from the next statement onward**, for the
11-
**lexically remaining part** of the current scope.
11+
**lexically remaining part** of the current scope. (This is how Python
12+
behaves at run time, anyway; trying to delete a local that hasn't yet
13+
been assigned to raises `UnboundLocalError`.)
1214
1315
This is mainly for symmetry with how ``do[]`` handles ``local[...]``, but it also
1416
allows the RHS of an assignment to see the old bindings. This may be important

0 commit comments

Comments
 (0)