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.
295: #line 367 "input_frame.ipk" 296: def begin(self): 297: ho = self.head_offset 298: self.select(None) 299: inpt = input_frame( 300: self.pass_frame, 301: self.source, 302: [], 303: self.current_weaver, 304: self.userdict.copy(), 305: self.depth) 306: inpt.head_offset = ho 307: inpt.set_warning_character(python=self.python_warn) 308: inpt.file_pass() 309: 310: def end(self): 311: self.select(None) 312: raise eoi 313: