Checking if the key exists in dictionary instead of using dict.get(key, None)
mohitanand001 opened this issue · 1 comments
mohitanand001 commented
FAI-PEP/benchmarking/driver/benchmark_driver.py
Lines 35 to 36 in a26fa88
FAI-PEP/benchmarking/driver/benchmark_driver.py
Lines 42 to 43 in a26fa88
Some places in this file
FAI-PEP/benchmarking/driver/benchmark_driver.py
has check if a key is in the dictionary and then tries to access it. It may be inefficient and less clean to go throughthe dictionary twice. Can I raise a PR to change these to
minfo["shared_libs"] = info.get("shared_libs", "")
cinfo["shared_libs"] = info.get("shared_libs", "")
sf-wind commented
Please do, thanks