it sounds like it's not an ideal state of affairs to begin with (why not just use a dict instead of attributes?)
it's taking a set of json files that have relatively similar data, but not exactly similar with regards to how the keys are utilized, and has nested json within elements, so I use pickle to dynamically serialize the currently processing json files keys with recursion to build out the classes, it does utilize some facets of dictionaries, but some of the logical forks it has to take are easier based on attributes than trying to predict the full key list from a dictionary.
Обсуждают сегодня