PyPO-dev / PyPO

📡 Open-source physical optics simulation package.
https://pypo-dev.github.io/PyPO/
MIT License
14 stars 3 forks source link

Change checker to incorporate dict.get() #168

Closed arendMoerman closed 5 months ago

arendMoerman commented 1 year ago

We now check dicts by trying to call dict[key]. I think we can reduce the amount of code and increase readability by using the dict.get(key) method.

MrGafaji commented 5 months ago

It looks like we're using if "key" in Dict, an alternative would be if dict.has_key("key") but it's more characters.