Remix.run Logo
SJC_Hacker 5 hours ago

Python is mostly about the “batteries included” standard library and what’s becoming nearly standard third party libs, being able to play around in the REPL,

zahlman 22 minutes ago | parent | next [-]

> “batteries included” standard library and what’s becoming nearly standard third party libs

Historically, the standard library made sense. And we're talking about a history that stretches back to before Internet connections were ubiquitous, to say nothing of connection speed.

Now the standard library is full of things that they refuse to remove because it would supposedly be too disruptive, but which they would never think of adding today if they weren't already there.

Kwpolska 2 hours ago | parent | prev [-]

The standard library is full of dead batteries. If the stdlib is so good, why does everyone install requests instead of using the stdlib http client? And why requests or something like it hasn't been adopted into stdlib after so many years of stability?

necovek an hour ago | parent [-]

Parts of requests has been adopted into stdlib: https://docs.python.org/3/library/urllib.request.html

People mostly defer to requests because they do not track language development closely and because we are creatures of habit.

I try to avoid non-stdlib packages when stdlib will do a good job, but I received negative feedback from people who aren't aware of the updates and couldn't foresee supply-chain attacks.

zahlman 24 minutes ago | parent [-]

The current standard library urllib is a refactoring of previous attempts from the 2.x standard library, and urllib.request is just a sub-package. It does not represent adoption of requests; requests builds on urllib3, which was created to fill in gaps in what the standard library provided, and named like that because the 2.x standard library had both a `urllib` and a `urllib2` as they struggled to figure it out.