Results in iterative query are aggreagated
As stated by closed issue #Results of repeated calls to Esearcher.inquire() are accumulated , the method aggregates the results for several queries. I've searched in pubmed for: Abnormality of body height and then for: Multicystic kidneys OR Multicystic kidney dysplasia OR Multicystic renal dysplasia OR Multicystic dysplastic kidney And the last one contains the PMID of the previous one. I've found a workaround tha is the following:
a = es.inquire({'db': db,'term':query, 'retmax': 10000, 'rettype': 'uilist'})
result = a.get_result().uids
a.result = None
The last line resets the class/object attribute and the results are no longer aggreagated. I recommend to you, @janpb to do test performing queries in iterating a query list because this behabiour is dangerous and other error arises if the esearch objec is instatiaed out of the loop.
Thank you Pedro Seoane