summaryrefslogtreecommitdiff
path: root/Lib/compiler
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-08-29 22:26:35 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2001-08-29 22:26:35 +0000
commit79a06bdfc2441e12f38884f4ab212e8c5f9c64c7 (patch)
tree00a4f1065acba396aabcc27cae9014d68ad958f2 /Lib/compiler
parent5519120a330fe475b6f7bc68ed13b21598f233c3 (diff)
downloadcpython-79a06bdfc2441e12f38884f4ab212e8c5f9c64c7.tar.gz
Add __getitem__() handler for use by visitContinue()
Diffstat (limited to 'Lib/compiler')
-rw-r--r--Lib/compiler/misc.py2
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