On Sun, Mar 27, 2022 at 3:08 AM Paul Moore p.f.mo...@gmail.com wrote:

exactly - let's say someone needs to write some JSON for the first time.

With the json package included, all they need to do is `import json`. If that wasn't there, they's look in PyPi for a JSON implementation, and find an absolutely astonishing number of options. I just did a search for "JSON" on PYPI, and it's HUGE -- most of them are for specialized JSON-using protocols of some sort. I was actually really surprised that couple I know about of the top of my head (ujson, orjson) are actually hard to find.

"You can just pip install it" is really not a good solution.

In fact, this is an example, I think, of where we should put some effort into making the included batteries better -- it's great to have a JSON lib built in, but it's too bad that it's not best-of-bread by pretty much any definition (speed, memory performance, flexibility) -- there are quite a few feature requests open for it -- it would be nice to actually implement some of those. (but yes, that's a lot of work that someone(s) would have to do)

Back to the topic at hand, rather than remove urllib, maybe it could be made better -- an as-easy-to-use-as-requests package in the stdlib would be really great.

-CHB


Strong plus one to this. Part of Python's huge attraction and widespread adoption is that one doesn't need a lot of formal training or engineering experience to just dive right in. Having a rich set of libraries only helps this, forcing newbies to pip/PYPI is a great way to lose them.

I also completely agree that the right answer is to make the standard libraries better, not throw them away.

And for those that don't use them, ignore them.

Best,

coyot
P.S. There are uses for urllib outside of standard web programming. I recently needed to handle strings in query parameter format (`?...&...&...`) and found urllib parse() the easiest way of doing that even though I wasn't taking them in as a webservice. Deleting the library would break this code. :(
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/Z7YNNVZKXBQO4QL2W2RYPDSTLEZZXNVV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to