Now the title_dict (which stores all relevant information about each title in a given set) is highly mutable, which can lead to it being erroneously changed at any stage in the process. Make it into an immutable dict (a custom class) and define the keys early in the process, which will guard against typos and other errors, and also make it easier to understand the entire structure.
Now the
title_dict
(which stores all relevant information about each title in a given set) is highly mutable, which can lead to it being erroneously changed at any stage in the process. Make it into an immutabledict
(a custom class) and define the keys early in the process, which will guard against typos and other errors, and also make it easier to understand the entire structure.