Closed raffaem closed 2 years ago
Both
chained_get(self._profile, path, []))
and listify(chained_get(self._profile, path, [])))
are list of dicts, so I wonder what the listify does here.
What do you think is the best way to fix this?
Deleting the ; seems impractical and too slow.
We could have a try ... except that does something more complicated in case of failure
The listify()
assures we always receive a list here. If chained_get(self._profile, path, []))
returns just single dictionary, as is the case for authors who work in just one subject area, listify()
safely turns this into a list. I've also seen cases where two dictionaries were just bind together.
You caught a really weird mistake in the Scopus database. It's of the sort of "how can we make the life of users really complicated?"
Your solution is good but too complex. I'll respond there.
PS: It's not necessary to first create an issue and immediately a PR. You might as well create the PR and explain its reason right there. Might save you time and it's less complex.
how do I post the code sample and the error message in the PR?
in a comment?
Yes. It behaves like an issue