Skip to main content
6 events
when toggle format what by license comment
May 25, 2019 at 10:03 comment added Graipher I would probably make a download_file function that just downloads a file to a destination and do the iterating over the links directly in download_reddit_images. But otherwise a very nice first review, welcome to Code Review!
May 22, 2019 at 17:38 comment added Prashant Sengar Thanks again for explaining so nicely @reeetooo
May 22, 2019 at 16:28 comment added reeetooo By unforeseen consequences I meant bugs like the one with self.user, since you wouldn't expect the code execution to be dependant on previous calls. The problem with using a class here is that it makes the code more complex than it has to be, while a function would work just fine. With the class, it also takes more lines to access the functionality of your code, since you have to create a Redpy object and then call download, whereas the only thing you gain is not having to enter user multiple times. For more information see this talk.
May 22, 2019 at 12:31 comment added Prashant Sengar Thanks a lot for your answer. Your answer was the most comprehensive and detailed analysis of the code. I had updated the code after following some PEP 8 guidelines. Here it is github.com/prashantsengar/RedPy ... I will update the code again based on your suggestions. I have a question though, how can using a class have unforeseen consequences. I want to know more about it. And thanks again for your valuable input
May 21, 2019 at 21:50 review First posts
May 21, 2019 at 22:15
May 21, 2019 at 21:46 history answered reeetooo CC BY-SA 4.0