Use of begin/end blocks is important to limit the lifetime of various objects. In particular, if a tangler is writing code to a named_file_sink, then the file will not be closed properly until it is destroyed.
206: #line 289 "input_frame.ipk" 207: def begin(self): 208: ho = self.head_offset 209: self.select(None) 210: inpt = input_frame( 211: self.pass_frame, 212: self.source, 213: [], 214: self.weaver, 215: self.userdict.copy(), 216: self.depth) 217: inpt.head_offset = ho 218: inpt.set_warning_character(python=self.python_warn) 219: inpt.file_pass() 220: 221: def end(self): 222: self.select(None) 223: raise eoi 224: