diff options
author | Fred Drake <fdrake@acm.org> | 2005-08-15 16:40:42 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2005-08-15 16:40:42 +0000 |
commit | f1229539de4033dd7c3cc4539bf47c76d49fb3f5 (patch) | |
tree | 6adb0104146c4e012b108eb2833f039cb2bb81f9 | |
parent | f7609f1e51a1bb7351325f33949841fe1e144a00 (diff) | |
download | zope-tal-f1229539de4033dd7c3cc4539bf47c76d49fb3f5.tar.gz |
- add a comment about a mysterious instance variable
- remove an unused assignment statement
- simplify an expression assignment
-rw-r--r-- | talinterpreter.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/talinterpreter.py b/talinterpreter.py index 708bc07..13e2001 100644 --- a/talinterpreter.py +++ b/talinterpreter.py @@ -184,6 +184,7 @@ class TALInterpreter(object): # [macroName, slots, definingName, extending, entering, i18ncontext] # the entries are mutated while on the stack self.macroStack = [] + # `inUseDirective` is set iff we're handling a metal:use-macro self.inUseDirective = False self.position = None, None # (lineno, offset) self.col = 0 @@ -839,7 +840,6 @@ class TALInterpreter(object): bytecode_handlers["condition"] = do_condition def do_defineMacro(self, (macroName, macro)): - macs = self.macroStack wasInUse = self.inUseDirective self.inUseDirective = False self.interpret(macro) @@ -888,10 +888,7 @@ class TALInterpreter(object): # extendMacro results from a combination of define-macro and # use-macro. definingName has the value of the # metal:define-macro attribute. - extending = False - if self.metal and self.inUseDirective: - # extend the calling directive. - extending = True + extending = self.metal and self.inUseDirective self.do_useMacro((macroName, macroExpr, compiledSlots, block), definingName, extending) bytecode_handlers["extendMacro"] = do_extendMacro |