When the input frame is stacked, its symbol dictionary is copied to the new input frame so that included files inherit the names from the including file. Any rebindings of those name in the new input file will be lost when the file ends, however.
For example, if the weaver is set to an HTML weaver, and an included file sets the weaver to a plain text weaver, when the included files ends, documentation will be written to the HTML weaver. The plain text weaver will have been closed when the last reference to it disappeared.
You should note, however, that while you cannot change the bindings of name in parent documents, you certainly can change the attributes of the objects named by them, and these changes are persistent. For example, if a child document changes an attribute of weaver inherited from the parent, the attribute will remain changed even after the child is exhausted. It's not that this behaviour is 'deliberate', so much as it's the way Python works :-)
1: #line 34 "input_frame.ipk" 2: import string 3: import re 4: import traceback 5: import sys 6: import os 7: import tempfile 8: 9: # these imports _should_ come from the global frame! 10: from interscript.drivers.sources.base import eof, eoi 11: from interscript.drivers.sources.disk import named_file_source 12: from interscript.drivers.sources.disk import parse_source_filename 13: from interscript.drivers.sources.disk import loadfile 14: from interscript.drivers.sources.cache import cache_source 15: from interscript.drivers.sinks.bufdisk import named_file_sink 16: from interscript.drivers.sinks.disk import simple_named_file_sink 17: from interscript.drivers.sinks.cache import cache_sink 18: from interscript.drivers.storage.memory import memory 19: 20: from interscript.tanglers.c import c_tangler 21: from interscript.tanglers.cpp import cpp_tangler 22: from interscript.tanglers.python import python_tangler 23: from interscript.tanglers.perl import perl_tangler 24: from interscript.tanglers.java import java_tangler 25: from interscript.tanglers.tcl import tcl_tangler 26: from interscript.tanglers.doc import doc_tangler 27: from interscript.tanglers.null import null_tangler 28: from interscript.tanglers.data import data_tangler 29: from interscript.core.protocols import has_protocol 30: 31: from interscript.parsers.html import sgml_wrapper, html_filter 32: try: 33: import interscript.utilities.diff 34: except: 35: pass 36: 37: def compile_parse_tab(res): 38: return map(lambda x: [re.compile(x[0]), x[1]], res) 39: 40: class deduce: pass 41: 42: extension_table = { 43: 'py':'python', 44: 'c':'c', 45: 'h':'c', 46: 'cpp':'cpp', 47: 'hpp':'cpp', 48: 'java':'java', 49: 'pl':'perl', 50: 'pak':'interscript', 51: 'ipk':'interscript', 52: 'dat':'data', 53: 'txt':'data', 54: 'doc':'doc' 55: } 56: