diff options
author | Fred Drake <fdrake@acm.org> | 2006-03-14 15:23:44 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2006-03-14 15:23:44 +0000 |
commit | 0303ea98d305ddb78f00c4787c39e538cf55a811 (patch) | |
tree | 56f5d4d964f0f50fe4718a2cb32a2e19d168534e | |
parent | 2b1c9fdc22f68bca98924b0ee1e52a399c846914 (diff) | |
download | zope-tal-0303ea98d305ddb78f00c4787c39e538cf55a811.tar.gz |
- avoid excess string splitting
- add a note about how a TODO could be handled
-rw-r--r-- | talinterpreter.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/talinterpreter.py b/talinterpreter.py index 4b1136e..de25ae7 100644 --- a/talinterpreter.py +++ b/talinterpreter.py @@ -899,7 +899,7 @@ class TALInterpreter(object): # We want 'macroname' name to be always available as a variable outer = self.engine.getValue('macroname') - self.engine.setLocal('macroname', macroName.split('/')[-1]) + self.engine.setLocal('macroname', macroName.rsplit('/', 1)[-1]) prev_source = self.sourceFile wasInUse = self.inUseDirective @@ -985,6 +985,9 @@ class TALInterpreter(object): try: self.interpret(block) # TODO: this should not catch ZODB.POSException.ConflictError. + # The ITALExpressionEngine interface should provide a way of + # getting the set of exception types that should not be + # handled. except: exc = sys.exc_info()[1] self.restoreState(state) |