+ subfields = self.field.split('.')
I would move this to the constructor
255 + return extract_field(raw_doc, subfields)
+def extract_field(raw_doc, subfields): 206 + if not isinstance(raw_doc, dict): 207 + return [] 208 + val = raw_doc.get(subfields.pop(0))
I would use a index argument and avoid the pop (especially pop(0)) and copy
216 + subfields = [] this line is not needed
same for these: 223 + if val is None: 224 + return []
line 209-210 cover that
« Back to merge proposal
+ subfields = self.field. split(' .')
I would move this to the constructor
255 + return extract_ field(raw_ doc, subfields)
+def extract_ field(raw_ doc, subfields): get(subfields. pop(0))
206 + if not isinstance(raw_doc, dict):
207 + return []
208 + val = raw_doc.
I would use a index argument and avoid the pop (especially pop(0)) and copy
216 + subfields = []
this line is not needed
same for these:
223 + if val is None:
224 + return []
line 209-210 cover that