summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-07-20 22:39:34 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-07-20 22:39:34 (GMT)
commit20f9c3c50f5e642295040c05e574ff9dc84bf207 (patch)
treea0bb84cba5bcdcb1fb7b059930076f52d3d3225c /Python/symtable.c
parent013783c529cfc459d05d261f5053ad7bf7d88c29 (diff)
downloadcpython-20f9c3c50f5e642295040c05e574ff9dc84bf207.zip
cpython-20f9c3c50f5e642295040c05e574ff9dc84bf207.tar.gz
cpython-20f9c3c50f5e642295040c05e574ff9dc84bf207.tar.bz2
revert unintended changes
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 37bdf2a..55c9f47 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -432,14 +432,7 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
return PySet_Add(free, name) >= 0;
}
if (flags & DEF_BOUND) {
- if (ste->ste_type == ClassBlock &&
- !(flags & DEF_PARAM) &&
- bound && PySet_Contains(bound, name)) {
- SET_SCOPE(scopes, name, LOCAL_ONLY);
- }
- else {
- SET_SCOPE(scopes, name, LOCAL);
- }
+ SET_SCOPE(scopes, name, LOCAL);
if (PySet_Add(local, name) < 0)
return 0;
if (PySet_Discard(global, name) < 0)
@@ -496,7 +489,7 @@ analyze_cells(PyObject *scopes, PyObject *free, const char *restricted)
long scope;
assert(PyLong_Check(v));
scope = PyLong_AS_LONG(v);
- if (scope != LOCAL && scope != LOCAL_ONLY)
+ if (scope != LOCAL)
continue;
if (!PySet_Contains(free, name))
continue;