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.
308: #line 380 "input_frame.ipk" 309: def begin(self): 310: ho = self.head_offset 311: self.select(None) 312: inpt = input_frame( 313: self.pass_frame, 314: self.source, 315: [], 316: self.current_weaver, 317: self.userdict.copy(), 318: self.depth) 319: inpt.head_offset = ho 320: inpt.set_warning_character(python=self.python_warn) 321: inpt.file_pass() 322: 323: def end(self): 324: self.select(None) 325: raise eoi 326: