• Fred Drake's avatar
    SafeMapping: · a93f1dd9
    Fred Drake authored
        The _push() and _pop() methods aren't really any different from
        the push() and pop() methods from the base MultiMap, so we can use
        them directly to avoid a lot of looks and method invocation
        overhead, and it's easier to tell from the code that they are just
        a renaming.
    
    Context.beginScope(), .endScope():
        Move an attribute access out of the loop since the attribute isn't
        re-bound inside the loop.
    
    Context.evaluateText():
        Re-phrase the condition in the if statement to allow the runtime
        to perform fewer global name lookups when possible, and avoid the
        tuple construction completely.
    a93f1dd9
TALES.py 10.9 KB