¡@

Home 

python Programming Glossary: self.lines

Python class to merge sorted files, how can this be improved?

http://stackoverflow.com/questions/1001569/python-class-to-merge-sorted-files-how-can-this-be-improved

path 'r' for path in paths # holds one line from each file self.lines file_handle.readline for file_handle in self.handles self.output_file.. in self.handles self.output_file open output_path 'w' self.lines_written 0 self._mergeSortedFiles #call the main method def __del__.. '' min_line self._getNextMin while min_line index self.lines.index min_line comparable self.key min_line if not self.dedup..