diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 22:26:35 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-29 22:26:35 +0000 |
commit | 79a06bdfc2441e12f38884f4ab212e8c5f9c64c7 (patch) | |
tree | 00a4f1065acba396aabcc27cae9014d68ad958f2 /Lib/compiler | |
parent | 5519120a330fe475b6f7bc68ed13b21598f233c3 (diff) | |
download | cpython-79a06bdfc2441e12f38884f4ab212e8c5f9c64c7.tar.gz |
Add __getitem__() handler for use by visitContinue()
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/misc.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/compiler/misc.py b/Lib/compiler/misc.py index b834a2e677..9cbd73ff23 100644 --- a/Lib/compiler/misc.py +++ b/Lib/compiler/misc.py @@ -39,6 +39,8 @@ class Stack: self.stack.append(elt) def top(self): return self.stack[-1] + def __getitem__(self, index): # needed by visitContinue() + return self.stack[index] MANGLE_LEN = 256 # magic constant from compile.c |