A bit of an odd quirk on python's dictionary get method is that a function specified in the second argument is run even if the key exists in the dictionary.
since it's better that get_default_base_name only runs when it's needed, since it can raise an exception, I think it's better to use or in this case.
I didn't add any unit tests for this PR because it would only be testing python's built in functionality but if you think a unit test or two would be useful I can add it.
A bit of an odd quirk on python's dictionary get method is that a function specified in the second argument is run even if the key exists in the dictionary.
Eg.
since it's better that get_default_base_name only runs when it's needed, since it can raise an exception, I think it's better to use
or
in this case.I didn't add any unit tests for this PR because it would only be testing python's built in functionality but if you think a unit test or two would be useful I can add it.