Closed M3rs closed 7 years ago
Pros/Cons of namedtuple:
(could probably rename it to something like release_info, based on use)
Code in count_downloads could look more like:
for release_info in get_release_info([package], json=json):
for url in release_info.urls:
# etc
Here is a talk by Raymond Hettinger (https://www.youtube.com/watch?v=wf-BqAjZb8M), towards the end he talks about how nametuples are great.
Pros:
Cons:
Ha, I was just watching that video and had it paused! namedtuple bit is at here and makes sense.
Would you like to resolve the merge conflict?
Resolved merge conflicts
Thanks!
Add basic tests for by_two function: empty input, even and odd length input.
Refactor by_two function to return more explicit namedtuple with items (url, data).