self.compression_formats is an dictionary with 3 initial entries: tuple containing 2 elements: open and string 'rb' for None,
self . compression_formats = { None : ( open , 'rb' ) , 'gz' : ( gzip . GzipFile , 'rb' ) , 'zip' : ( SingleZipReader , 'r' ) , }