Refactor MDBObjectMeta.__call__ into dispatch function
The MDBObjectMeta.__call__
deals with the instantiation of objects. It allows instantiation by object_id
, filename
, or explicitly listing all the attributes. This used to be a single and very complex function. This MR refactors it into several functions, so __call__
is essentially a dispatcher.
@teake may I ask you, as a relative outsider, to see whether this code makes sense to you? What is unclear or too ugly? It is for sure clearer than the previous code, but it might benefit from a better review. (Maybe it would be easier to look at the file as a whole than the changes tab.)
The code is not yet perfect. As in, there are several (edge) cases that are not properly supported. Those can be included when needed.