@@ -345,14 +345,17 @@ def _read_cache(
345345
346346 else :
347347 # read from the initial
348- out = []
349- out .append (self ._fetch_block_cached (start_block_number )[start_pos :])
348+ out = [self ._fetch_block_cached (start_block_number )[start_pos :]]
350349
351350 # intermediate blocks
352351 # Note: it'd be nice to combine these into one big request. However
353352 # that doesn't play nicely with our LRU cache.
354- for block_number in range (start_block_number + 1 , end_block_number ):
355- out .append (self ._fetch_block_cached (block_number ))
353+ out .extend (
354+ map (
355+ self ._fetch_block_cached ,
356+ range (start_block_number + 1 , end_block_number ),
357+ )
358+ )
356359
357360 # final block
358361 out .append (self ._fetch_block_cached (end_block_number )[:end_pos ])
@@ -821,14 +824,17 @@ def _read_cache(
821824
822825 else :
823826 # read from the initial
824- out = []
825- out .append (self ._fetch_block_cached (start_block_number )[start_pos :])
827+ out = [self ._fetch_block_cached (start_block_number )[start_pos :]]
826828
827829 # intermediate blocks
828830 # Note: it'd be nice to combine these into one big request. However
829831 # that doesn't play nicely with our LRU cache.
830- for block_number in range (start_block_number + 1 , end_block_number ):
831- out .append (self ._fetch_block_cached (block_number ))
832+ out .extend (
833+ map (
834+ self ._fetch_block_cached ,
835+ range (start_block_number + 1 , end_block_number ),
836+ )
837+ )
832838
833839 # final block
834840 out .append (self ._fetch_block_cached (end_block_number )[:end_pos ])
0 commit comments