5 ms·
I don't mean to badmouth Requests or Python in general, it certainly looks like an improvement, but can anyone enlighten me as to why an API that wraps an HTTP
by efsavage 15y ago
I don't mean to badmouth Requests or Python in general, it certainly looks like an improvement, but can anyone enlighten me as to why an API that wraps an HTTP request with concise methods is #1 on HN, twice? This looks more like a good answer to SO question than "news".
This looks like all the other wrapper methods you spend 5 minutes doing, once, when you start a new codebase?
- mcav 15y agoIt's #1 because people vote it up; people vote it up because it interests them or they'd like to see more of it. That's the pattern for every link here. We may agree or disagree with the consensus of the masses, but the masses make the front page.
- tomp 15y agoThe design of this library reminds me of Apple's design... While a lot of Python is more like Google, or Microsoft - they just don't get it. (Admittedly, parts of Python are very well-designed, but I still see a lot of room for improvement...)
- toyg 15y agoMaybe because doing the same wrappers over and over again, as short as they might be, is boring?
- lukeschlather 15y agoThe philosophy of Python is that those wrapper methods shouldn't be necessary. I'm glad when language quirks and libraries get linked, it's good for discussion. (And more informative than a good third of the stuff that gets linked.)
- drgath 15y agoI came here with the same question. Considering I come from PHP & JavaScript where the native APIs are awful, wrapping is a necessary step for sanity. Interesting that Python didn't have this until now.
- lukeschlather 15y agoPython has always had it to some degree, but merging these sorts of things into the core language is what major releases are for. No language is perfect. I think the reason you see this upvoted so much is there are so many Python programmers who want to see this on the roadmap for future versions of Python (and it probably will be.)
- kenneth_reitz 15y agoI couldn't agree more. I gave a talk about this very thing at PyCodeConf this week. Here are the slides: http://python-for-humans.heroku.com http://python-for-humans.heroku.com