Skip to content

Commit c6028fb

Browse files
Merge pull request #474 from DimitriPapadopoulos/PTC-W0015
Unnecessary generator - rewrite as a dict comprehension
2 parents 03dfa92 + b725c6e commit c6028fb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bench/ndarray/compute_dists.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@
3636
blosc2.storage_dflts["contiguous"] = storage.contiguous
3737
blosc2.storage_dflts["mode"] = storage.mode
3838

39-
urlpath = dict((aname, None) for aname in ("a", "b", "c"))
4039
if persistent:
41-
urlpath = dict((aname, f"{aname}.b2nd") for aname in ("a", "b", "c"))
40+
urlpath = {aname: f"{aname}.b2nd" for aname in ("a", "b", "c")}
41+
else:
42+
urlpath = {aname: None for aname in ("a", "b", "c")}
4243

4344
btimes = []
4445
bspeeds = []

0 commit comments

Comments
 (0)