Some small optimizations:
SafeMapping.has_get(): Simplify in order to reduce the number of Python bytecodes. There is no longer a branch, which isn't strictly necessary. Context.evaluateStructure(), .evaluateMacro(): Since these methods are essentially synonyms for evaluate(), avoid the extra method lookup & call by simply making them aliases. Context.evaluate(): Re-arrange the try/except/except to avoid some of the exception catching by moving part of the try clause into an else clause.
Showing
Please register or sign in to comment