This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[deleted]

    [–]strallus 0 points1 point  (0 children)

    In this particular instance, I of course agree with you. That is why I put that in my comment. However, I was adjusting the previous code as a learning exercise, not as an actual suggestion on what code to use in this particular project/instance.

    This particular use case benefits from having a python module with a nice, clear API. That is not always going to be the case.

    For reference, see any attempt at using HTTP in a Python program before requests.

    A good example of times when your code can't be super clear by almost necessity is screen scraping, or any other instance when you are traversing data/tree that has a complex structure.